Commit Graph

302 Commits

Author SHA1 Message Date
78568e9995 Fixed sizes for the "db", "dw", "dl" and "dq" instructions 2011-05-08 17:21:03 +00:00
5ecfa2ce56 Identifying more calls 2011-05-08 00:23:35 +00:00
f193041208 Defined a few more arguments as indexes to method names 2011-05-08 00:15:19 +00:00
9e598335ea Implemented a few more instructions and prefixes 2011-05-08 00:08:44 +00:00
fa4f93e29f Fixed and added a few instructions 2011-05-07 23:43:12 +00:00
de372f12aa Code cleanup 2011-05-07 23:42:53 +00:00
42341e0ff5 Removed debugging left-over 2011-05-07 23:30:32 +00:00
c38c9b0fd6 Code cleanup 2011-05-07 23:26:55 +00:00
4cda60c32c Fixed detection 2011-05-07 23:26:17 +00:00
27f30975b1 More reliable decoding 2011-05-07 23:16:53 +00:00
e4fc7626ff Code cleanup 2011-05-07 23:15:45 +00:00
a296d8ea63 Avoid warnings when compiled in debugging mode 2011-05-07 15:28:35 +00:00
7fa5dbc51f Working on better support for deassembling functions 2011-05-07 15:05:29 +00:00
aaba31a0db Fixed duplicate error reporting 2011-05-05 10:51:53 +00:00
6d022bd70d This file is no longer required 2011-05-05 10:51:00 +00:00
2e7902b0cb Implemented "-D" to influence the pre-processor 2011-05-04 16:18:41 +00:00
266f4c2682 Fixed semantics of type vs definition for ArchOperands 2011-05-02 01:08:21 +00:00
d16f99ebbb Moved detection of file format and architecture for deassembling into libasm 2011-05-01 20:07:15 +00:00
8c4cb8cce7 Use the predefined macros 2011-05-01 13:47:47 +00:00
955abacfb1 Exposing the Code class to both Arch and Format to avoid defining callbacks 2011-04-29 05:51:36 +00:00
1e482f87e1 Display the offset again 2011-04-28 08:52:45 +00:00
24200d4689 Moved deassembly printout into the Code class (allows printing strings) 2011-04-28 08:47:28 +00:00
25dce8d5bf Allow immediate values to reference string indexes 2011-04-28 07:51:45 +00:00
17f9579803 Fixing dependencies 2011-04-28 07:51:09 +00:00
04c95f6d79 Let CVS be quieter 2011-04-28 07:49:59 +00:00
39de4b15fd Added a few instructions 2011-04-28 06:24:10 +00:00
6870bbd088 Build a statically-linked version of asm for tests 2011-04-28 02:54:43 +00:00
dc35c51e55 Implemented some more parts of the API 2011-04-28 02:01:48 +00:00
36b78c27ed Preparing the API for maximum code re-use 2011-04-28 01:22:19 +00:00
e6329a15f6 Removed unused code 2011-04-28 00:04:21 +00:00
524ef4d910 Simplifying the API 2011-04-27 23:57:16 +00:00
7bbe4797be Renamed the "As" class to "Asm" 2011-04-27 23:54:47 +00:00
e7c3dc36b2 Added more i386 instructions 2011-04-25 16:19:24 +00:00
a76056547a Still adding jump instructions 2011-04-25 16:03:15 +00:00
7e14e3759a Added some more jump instructions 2011-04-25 16:01:57 +00:00
0f27c79d03 Added a few jump instructions 2011-04-25 15:58:30 +00:00
9176288890 Much work on better support for disassembling the Mod R/M byte 2011-04-25 06:16:07 +00:00
5361aa325a Nicer diassembly output 2011-04-25 03:41:49 +00:00
4fb64f8b2f Get rid of a couple warnings 2011-04-25 03:31:02 +00:00
95b8ad869b Disassembling i386 now has many more chances to complete 2011-04-25 03:14:48 +00:00
d3b506a52b Still working on i386 disassembly 2011-04-25 02:44:54 +00:00
59d9af1dd8 Improving i386 disassembly some more 2011-04-25 02:29:16 +00:00
4f328cb963 Added a mnemonic for the "call" instruction 2011-04-25 01:46:58 +00:00
37edc4e721 Disassembling some more i386 2011-04-25 01:37:10 +00:00
fbf01a7e91 Added two mnemonics for the "mov" instruction 2011-04-25 01:24:18 +00:00
e65c36ce04 Added the "jmp" instruction 2011-04-25 01:08:56 +00:00
98faecff40 Slightly improved i386 instruction decoding 2011-04-25 01:02:27 +00:00
69dd017c53 Got rid of a warning 2011-04-25 00:12:17 +00:00
92979e4dac Saving all instructions into memory before printing them (will help handle labels) 2011-04-25 00:10:50 +00:00
62978f4e08 Probably solved an endian issue 2011-04-24 16:46:26 +00:00
887cec89da Avoided a warning 2011-04-24 16:43:11 +00:00
99240a31be Improved the disassembly output again 2011-04-24 16:42:24 +00:00
9229d32d41 Improving disassembly support for the amd64 architecture 2011-04-24 04:57:13 +00:00
360afd3ad1 Report more errors 2011-04-24 04:56:31 +00:00
4d8a6ee281 Code cleanup 2011-04-24 03:39:11 +00:00
2d9240b494 Code cleanup 2011-04-24 03:23:57 +00:00
0dce6d04ce Fixed a potential invalid array access 2011-04-24 03:23:25 +00:00
79e248b195 Improving Dalvik again 2011-04-24 03:10:53 +00:00
85fcaa2e01 Minor improvements to Dalvik disassembly 2011-04-24 02:46:12 +00:00
4fd35ba7cc Mostly fixed the Dalvik disassembly table 2011-04-23 23:42:40 +00:00
3a7bc16298 Improved the Dalvi diassembly and output some more 2011-04-23 23:20:09 +00:00
442efe1151 Disassembling some more Dalvik 2011-04-23 21:49:35 +00:00
e243a69199 Disassembling some more Dalvik 2011-04-23 21:20:12 +00:00
5e227be104 Disassembling some more Dalvik 2011-04-23 21:06:48 +00:00
a4c030b500 Beginning to decode Dalvik instructions again 2011-04-23 20:50:52 +00:00
e17f8ddb46 Fixed double fclose() 2011-04-23 19:44:51 +00:00
4a5f818e46 Code cleanup 2011-04-23 18:48:08 +00:00
940b858a84 Improving the output 2011-04-23 17:48:37 +00:00
383ca51178 Beginning to disassemble files again 2011-04-23 17:40:05 +00:00
c0a0820fe4 Also decode immediate values to some extent 2011-04-23 16:48:15 +00:00
53e6e6690f Code cleanup 2011-04-23 16:47:49 +00:00
b67bb1ad90 Better handling of the temporary "db" substitution instruction 2011-04-23 07:48:57 +00:00
8a24516f7f Decoding some more i386 2011-04-23 07:46:35 +00:00
41e423407f Return "db" when more convenient for the moment 2011-04-23 06:40:42 +00:00
91ecd5ab54 Beginning to be useful as a disassembler again 2011-04-23 06:09:06 +00:00
4bd2f1c684 Compile with the -g flag set 2011-04-23 06:08:18 +00:00
73174d63c3 Compile with the -pedantic flag set 2011-04-23 06:07:22 +00:00
1e046db958 Fixed compilation in debugging mode 2011-04-23 06:06:34 +00:00
b56d0f3f4e Preparing to support disassembly again 2011-04-23 03:51:39 +00:00
53d6f4cbc3 Re-introducing support for the amd64 architecture 2011-04-23 03:11:00 +00:00
1f6ffd20a0 Got rid of a warning 2011-04-23 03:02:32 +00:00
a8407ddd19 Using helper callbacks to write assembly instructions 2011-04-23 03:01:55 +00:00
26777f9856 Got rid of some compilation warnings 2011-04-23 01:14:04 +00:00
438ef5939a Beginning to encode and test Dalvik instructions again 2011-04-23 01:12:37 +00:00
c4aef2db4f The encoding of instructions of slightly more correct 2011-04-23 01:11:20 +00:00
47efb56960 Completed the instruction list for the Dalvik architecture (need be checked) 2011-04-22 23:17:16 +00:00
aeab2aa627 Re-introducing support for the Dalvik architecture 2011-04-22 22:52:50 +00:00
7b7ecbcb58 Code cleanup 2011-04-22 22:51:25 +00:00
24836cadfd Re-introducing support for the Java architecture 2011-04-22 17:53:02 +00:00
a932a7fc54 Fixed the file information 2011-04-22 17:28:41 +00:00
2bb09ddb7d Using callbacks for file operations 2011-04-22 02:29:44 +00:00
0f1d52fbb9 Avoid a couple of warnings 2011-04-21 19:28:03 +00:00
fae68e5fd1 Re-introducing support for the sparc64 architecture 2011-04-21 19:20:50 +00:00
8ebf1b07af Also implemented branching instructions 2011-04-21 17:03:21 +00:00
f8312d08fb Encoding instructions for integer operations as well 2011-04-21 16:39:36 +00:00
33039927e3 Now encoding sethi instructions as well 2011-04-21 16:28:35 +00:00
9b692011ca Encoding "load and store" instructions much better already 2011-04-21 16:16:07 +00:00
b2a710ed6f The format plug-ins need libSystem to compile too 2011-04-21 00:49:34 +00:00
4e808a815e The arch plug-ins depend on libSystem to compile 2011-04-21 00:48:00 +00:00
bbe4db81cf Added the "fyl2xp1" and "hlt" instructions 2011-04-20 00:38:01 +00:00
ccb676dc53 Added the "in" instruction 2011-04-20 00:35:04 +00:00
50cef996e6 Added the "inc" instruction 2011-04-20 00:30:43 +00:00
c1ea0b8cd9 Still let "int $3" be output as two bytes and added the "int3" instruction 2011-04-20 00:25:12 +00:00
1490b7a0f8 Added the "insb", "insw" and "insd" instructions 2011-04-20 00:20:50 +00:00
79a1a18406 Fixed handling of constants 2011-04-20 00:19:52 +00:00
b15f7b60fe Fixed handling of the AOF_IMPLICIT flag 2011-04-20 00:11:36 +00:00
a3402c25d7 Added the "int", "into", "invd", "iret", "iretd", "lahf" and "leave" instructions 2011-04-20 00:05:00 +00:00
e1a786327b Handle (implicit) constant values as well 2011-04-20 00:04:17 +00:00
4b0269c881 Properly matching constant values 2011-04-20 00:03:53 +00:00
2aaa34e124 Added the "lock", "lodsb", "lodsd", "lodsw", "loop", "loope", "loopne", "loopnz" and "loopz" instructions 2011-04-19 23:28:38 +00:00
fb58a25507 Added the "movd" instruction 2011-04-19 23:05:58 +00:00
2e8a3235b8 Added the "movq" instruction 2011-04-19 23:02:19 +00:00
fd22e83f7d Added the "movsb" and "movsd" instructions 2011-04-19 22:52:23 +00:00
780f33e8d9 Added the "mul" instruction 2011-04-19 22:47:44 +00:00
22f4e5efd4 Added the "neg" instruction 2011-04-19 22:45:57 +00:00
dc0ef0b8d1 Added the "not" instruction 2011-04-19 22:44:30 +00:00
0c242bf1a8 Added the "or" instruction 2011-04-19 22:39:52 +00:00
b5d59fbdaa Added the "out", "outsb", "outsd" and "outsw" instructions 2011-04-19 22:33:09 +00:00
f41af9429d Added the "fcom", "fcomp", "fcompp", "fcos" and "fdecstp" instructions 2011-04-19 20:02:44 +00:00
cc04acaa9c Added the "fdiv" and "fdivp" instructions (not complete yet though) 2011-04-19 19:51:40 +00:00
02eb799bbc Added the "fdivr" and "fdivrp" instructions 2011-04-19 19:34:00 +00:00
d0db1fc46c Added the "ffree" instruction 2011-04-19 19:19:00 +00:00
1eab4a6480 Added the "finit" and "fninit" instructions 2011-04-19 19:13:54 +00:00
6035c59379 Added the "fld" instruction (not complete yet) 2011-04-19 19:08:56 +00:00
ca1903cc39 Added the "fld1", "fld2t", "fld2e", "fldpi", "fldlg2", "fldln2", "fldz" and "fnop" instructions 2011-04-19 19:02:06 +00:00
a2381831b6 Added the "paddb", "paddd" and "paddw" instructions 2011-04-18 23:32:23 +00:00
908f8bb04f Added the "paddsb", "paddsw", "pand" and "pandn" instructions 2011-04-18 23:29:54 +00:00
ca55c53c6a Added the pop family of instructions 2011-04-18 23:24:22 +00:00
96bc81411b Added the "por" instruction (doesn't always work yet) 2011-04-18 23:15:19 +00:00
16003850ee Added some comments 2011-04-18 23:13:10 +00:00
a28ca014cc Added the push family of instructions 2011-04-18 23:11:06 +00:00
e0b1faf4c4 Trying to add the "pxor" instruction 2011-04-18 22:54:55 +00:00
cd05aec823 Added the "rdmsr" and "rdpmc" instructions 2011-04-18 22:18:04 +00:00
d3ac707bad Re-introduced support for the i586 variant of the i386 architecture 2011-04-18 22:12:51 +00:00
a308c18ee0 Added the "ret", "rsm" and "sahf" instructions 2011-04-18 22:06:18 +00:00
c4194014ab Fixed looking for the right instructions when there are no arguments 2011-04-18 22:05:40 +00:00
c5d171cf7e Added the "sbb", "scasb", "scasd" and "scasw" instructions 2011-04-18 21:54:51 +00:00
d419ed9137 Fixed a comment 2011-04-18 21:54:08 +00:00
883c719e89 Added the "sgdt" and "sidt" instructions 2011-04-18 21:18:59 +00:00
d5a189df1e Also allow negative offsets to registers (not implemented yet though) 2011-04-18 21:18:25 +00:00
16537081a7 Added the "shld" instruction and apparently fixed "shrd" as well 2011-04-18 21:10:53 +00:00
5edb9c5c9f The "cpuid" instruction was added in i486 2011-04-18 06:31:45 +00:00
8973221291 Added the "shrd" instruction (doesn't seem to work) 2011-04-18 06:30:43 +00:00
d39c9b525e Added the "stc" "std" "sti" "stosb" "stosw" and "stosd" instructions 2011-04-18 05:50:49 +00:00
06170c28f6 Added the "sub" instruction 2011-04-18 05:41:13 +00:00
3761dfe72e Added the "test" and "ud2" instructions 2011-04-18 05:27:23 +00:00
5863e7490b Be less strict when checking signed values 2011-04-18 05:06:04 +00:00
c10141ffed Added the "fwait", "wait" and "wbinvd" instructions 2011-04-18 04:48:37 +00:00
aa0980d7e7 Added the "wrmsr" instruction 2011-04-18 04:46:13 +00:00
0c62418851 Added the "xadd" instruction 2011-04-18 04:43:59 +00:00