Commit Graph

114 Commits

Author SHA1 Message Date
pancake
965a577af2 * More work on the r_anal/r_syscall refactoring for calling conventions 2011-02-02 13:05:48 +01:00
pancake
af7cfafc0d * Initial api for r_anal_cc (calling conventions)
- Not yet implemented, just a draft
* Added initial AVR cpu code analysis plugin
2011-01-26 21:54:39 +01:00
Nibble
2e26e35584 * Add bb list into RAnalFcn structure
* Analyze bbs per function
* Remove gdiff from radiff2 temporary (deprecate?)
  - Meanwhile ragdiff2 should be used
* Update TODO
2010-12-24 13:27:20 +01:00
Nibble
2bb73ba631 * Add getter r_anal_get_fcns()
* Install python bindings also in dist-packages
* Update and fix some vapis
2010-12-06 16:26:21 +01:00
Nibble
a0ae2c2286 * Show detailed info for diffing in afl output
* Create struct RAnalDiff and move diff related fields inside
* Move {RAnalFcn, RAnalBlock}.diff from int to RAnalDiff*
* Add r_anal_diff API
2010-12-05 08:46:56 +01:00
Nibble
f50fc41794 * Huge refactoring of gdiff using Levenshtein distance and binmasks 2010-12-04 15:14:53 +01:00
Nibble
fc11acc128 * More work in var analysis
* Put RAnalVar->type and RAnalVar->dir together
2010-12-03 13:52:11 +01:00
Nibble
eb88fa40fc * Set variable direction during function analysis
* Add argument "dir" to r_anal_var_add()
* Fix reg handling in x86im plugin
* Fix variable analysis in r_anal
* Use plugin "x86" in ranal2 by default
2010-11-29 20:06:11 +01:00
Nibble
7e8b8a9900 * Show /* func: */ or /* loc: */ in disassemble
* Filter fcn searchs by type (reduce pd time)
* Add arg 'type' to r_anal_fcn_find()
2010-11-23 19:55:31 +01:00
Nibble
e4832f435d * Distinguish betwen fcn's (call refs) and loc's (jmp refs)
* Show fcn type and code xref type in 'afl' output
  - C for calls, J for jmps
* Add optional argument 'type' to command 'af+'
  - l for loc's, f for fcn's (default)
* Add argument 'type' to r_anal_fcn_add()
* Add field type to RAnalFcn and enum RAnalFcnType
2010-11-23 17:15:33 +01:00
Nibble
b3cd57f573 * Add arg reftype to r_core_anal_fcn()
* Add R_ANAL_REF_TYPE_CALL and R_ANAL_REF_TYPE_NULL to RAnalRefType enum
* Set type R_ANAL_REF_TYPE_CALL to call refs during opcode analysis
* Fix bug in r_core_anal_fcn() increasing performance
2010-11-23 14:05:23 +01:00
Nibble
60f54b6969 * Add r_core_anal_fcn_cc() in r_core for Cyclomatic Complexity calc
* Add command 'afc'
* Add fields 'ncalls' (number of calls) and 'conditinal' to RAnalBlock
* Set anal.split=true by default
2010-11-22 15:14:54 +01:00
Nibble
71978e186f * More optimization on the analysis loop
* Add config_analsplit_callback() in anal/config.c to set RAnal->split
* Add field split to RAnal struct
  - Avoid unnecessary call during BB analysis
* Set the default anal depth to 100
* Take into account internal calls in xref analysis
* Rename anal_x86_x86im to anal_x86 and make it the default anal plugin
* Rename anal_x86 to anal_x86_simple (x86.simple)

--HG--
rename : libr/anal/p/anal_x86_x86im.c => libr/anal/p/anal_x86.c
rename : libr/anal/p/anal_x86.c => libr/anal/p/anal_x86_simple.c
rename : libr/anal/p/x86_x86im.mk => libr/anal/p/x86.mk
rename : libr/anal/p/x86.mk => libr/anal/p/x86_simple.mk
2010-11-20 16:47:15 +01:00
pancake
63be7d8070 * Use relative symlinks in versioned libs
* Add r_meta stuff inside r_anal api
2010-10-28 12:10:21 +02:00
pancake
98cc88700d * Added much more detailed vapis
- Enhaces API support for valaswig bindings
  - I'm probably breaking the build
2010-10-28 00:55:07 +02:00
Nibble
697490a661 * r_core
- Implement 'ar' commands
  - Show XREFS in disassembly
* r_anal
  - Add r_anal_xref_get
2010-09-28 18:05:31 +02:00
Nibble
eb811bbf08 * r_core
- Deprecate ah and add anal.plugin
  - e anal.plugin=? list available plugins
  - Add the command 'ar' to handle refs/xrefs
  - Remove old CX and Cx stuff
  - Remove afg (done by af)
* r_anal (& r_meta)
  - Remove refs/xrefs stuff from r_meta
  - Handle refs from r_anal
  - Add r_anal_ref_{add, del}
* rabin2
  - Add 'e anal.plugin' to the output of rabin2 -Ir
2010-09-28 13:58:03 +02:00
Nibble
69d08e1514 * Huge refactoring of x86_x86im using r_anal_value
- next step is integrate it in the analysis engine and deprecate old stuff
* Add field "imm" (immediate value) to RAnalValue
2010-09-23 13:25:46 +02:00
Nibble
49dceaaffd * More work on anal_x86_x86im refactoring 2010-09-22 18:31:15 +02:00
pancake
1356a9bdd1 * Highlight destination offset when cursor on jmp/call in visual
* Show call decompilations under the opcode as a comment
* Rename RRegister as RReg
  - Deprecate r_reg_init and use r_reg_new
  - Rewrite the list.h dependency in r_reg in order to use r_list
  - Fix some memory leaks
* Implement push/pop methods in RReg class
  - add test case using it
  - will be used for register diffing and tracing
2010-09-18 02:51:17 +02:00
Nibble
f7693a14d2 * Huge refactoring of anal_x86_x86im
* Add comments in anal_x86_x86im explaining how x86im parse the opcodes
* Implement analysis for more opcodes
* Rename R_ANAL_OP_TYPE_RCALL into R_ANAL_OP_TYPE_UCALL (more generic)
* Update anal_mips.c and r_anal.vapi
* Update TODO
2010-09-05 21:20:56 +02:00
pancake
3c8ddce624 * Import more r_anal_var stuff from r1
- Implemented 'af[aAv]' command.
  - In r1 this command is 'CF[aAv]'
  - Variable contents are not displayed yet
2010-08-22 18:41:57 +02:00
pancake
3ced8a528c * Initial work on function_from_string parser for r_anal
- CF? for testing
2010-08-12 12:19:25 +02:00
Nibble
a7750b3204 * r_anal
- Add field at to RAnalRef
  - Set ref->at to the addrees of the opcode which does the
    jump/call
  - Set correctly the xrefs "from" address
* r_core
  - Modify afl to accept an optional argument [fcn name] to
    filter output by function
  - Change afl output to group xrefs by type (code and data)
2010-08-02 12:42:59 +02:00
pancake
67ad35187b * Refactor TODO
* Added r_anal_fcn_to_string() and get_var()
  - vars now have array size and direction
* Some random fixes
  - minor opimitzation in autocompletion (thx edu)
* Added Vtlr command to rename in visual tracked flags
2010-07-12 21:37:40 +02:00
pancake
07d55075ae * Add openbsd|netbsd|freebsd to the list of automatic ostypes
* Do not allow to build if shared object extension is not defined
* Remove the use of R_META_FUNCTION in r_core (this was breaking the build)
  - Now takes the information from the r_anal->fcns
  - Uses the new function r_anal_fcn_find()
* The 'pdf' command now prints the whole function independently of your
  offset. This also simplifies a bit the r_print_disasm function.
2010-07-03 03:35:26 +02:00
pancake
182b7737cf * Remove deprecated documentation
* Some syntax fixes
* Some changes in the design of the vars in r_anal
* Remove 'CF' command and META_FUNCTION type
* Fix 'S' '*' mark when in debugger
2010-07-02 02:01:51 +02:00
pancake
37c3e25664 * RCore now depends on RThread
- Loads rabin2 information in a background thread
  - Prompt is now much more responsive
  - Fix segfault in null pointered var in RThread
* rabin2 load strings only from data sections if found
* Split r_core_prompt/exec (make it cooperative-thread-friendly)
2010-06-23 17:30:16 +02:00
pancake
33fdb14643 * Added dummy anal.mips 2010-06-23 04:02:57 +02:00
pancake
255504b79c * Added initial aop_to_string() method for RAnal
- accessible via asm.decode
* Add more 'Vd' keys (data, code, string, ..)
2010-06-21 11:55:48 +02:00
pancake
4f8fc7d926 * Added traced field in RAnalBB
- Display 'traced' flag in 'abl' command
* Initial work on 'dd' command (filedescriptors)
  - API defined, not yet implemented or used
2010-06-18 11:09:19 +02:00
pancake
123faacd3c * Implement r_anal_cond_eval() and r_anal_value_to_ut64() functions
- Code seems to work and basicblock conditionals can be evaluated
  - Show 'match' result in 'abl' command
  - Wrong namespace
2010-06-18 00:53:47 +02:00
pancake
c8da941768 * Very early work on r_anal_call api
* Initial support for visual cursor with invert cons in 'pd' bytes
  - Some changes in '*' and '/' keys in visual modes (+-16)
  - '+/-' in visual cursor works as in r1 (inc/dec cursor byte)
* Rename 'zf' into 'zh' for header, not function
  - 'zf' stands now for function signatures (args, types, ret, ...)
2010-06-17 17:55:39 +02:00
pancake
23ad3d2415 * Added asm.linescall=false (default)
- Implemented in anal_reflines to skip call analysis for lines
* Set dbg.trace=true by default
* Display trace count and times in 'pd' (asm.trace)
  - counter starts as 1, not 0 :)
* Added 'absolute' variable in RAnalValue (not yet used..)
  - Defines the sign of the value (needs arch-dependent code)
* Sync TODO files
2010-06-17 02:22:50 +02:00
pancake
882d7efa7b * Add more 'cmp' opcodes support in analysis for x86
* memref now specifies the size of pointer
  - this is serialized as a cast (char) ..
  - no sign support yet
2010-06-17 01:48:51 +02:00
pancake
e36ef11025 * Initial working basic block conditional decompilation
- Only 'test' opcode for x86 is currently supported (just for testing)
  - analysis backend generates RAnalValue's for each argument
  - compiles a cmp+cjmp into a RAnalCond class
  - de/serializes the RAnalCond into an evaluable string
  - Make anal api more stable
* Fix a memory leak in anal_bb
* Reassign anal->reg into dbg->reg
  - Replicate dbg->reg into dbg->anal->reg
  - Such nasty cascade assignation..
2010-06-16 21:44:19 +02:00
pancake
a580ff4fa8 * Initial implementation of the subclassed RLFList class
- Implements a serialized RFList inside a RList container
  - Allows faster scans on contents
* Initial import of the RAnalCond/Value code
  - Not yet usable..just refactoring..
  - Handle null pointers in reg classes
* Added not-yet-working emit_arm.c for r2rc tool
2010-06-16 09:42:46 +02:00
pancake
16089bb6e9 * Fix build of binr/
- Some missing deps everywhere
* Initial work for RAnalCond
2010-06-15 00:46:18 +02:00
Nibble
aa762573b5 * Fix r_debug build
* More random fixes in r_anal
2010-06-14 18:52:49 +02:00
pancake
d3c0819cc7 * Some fixes in make all/clean
* Initial work on RAnalCond
2010-06-14 16:20:54 +02:00
pancake
4bd719546c * Implement RAnalRef as a struct instead of a hacky ut64 pointer
- Support data and code reference specification
* Also handle 'jmp' as code references
2010-06-14 00:57:40 +02:00
pancake
c9a403cf71 * More work on 'at' command
* RRange ported to r_list (not yet tested)
* Fix r_cmd.vapi RCmdPlugin struct definition
2010-06-04 23:47:35 +02:00
pancake
9ceeae1f54 * Added refptr in RAnalOp
- Used only from ARM code analysis
* Implement ELF get_main for ARM ELF's
2010-06-02 23:36:05 +02:00
Nibble
5c35f6e359 * Rename {r_*_handle_t, R*Handle} to {r_*_plugin_t, R*Plugin} 2010-05-26 01:42:22 +02:00
pancake
76e52fdeb0 * Added install-symlink (0.3s vs 3s) faster install for devel
* Added 'S' key in visual mode (step over)
* Safer 'dcc' and 'dcr' commands using step over if necessary
  - Skip current instruction (do not lock on calls, rets..)
* Implement step over functionality
2010-05-24 17:51:51 +02:00
Nibble
4f236eded5 * r_anal
- rename R_ANAL_BB_DIFF_* to R_ANAL_DIFF_*
  - add field diff to RAnalFcn
  - Allow r_anal_{bb,fcn}_set to edit an existing one
* r_core
  - Output diff state with afl, abl, af* and ab*
  - Allow to change the diff state with af+ and ab+
2010-05-24 13:57:49 +02:00
Nibble
9a76d39a7a * Add optional libgmp dependecy
* Update configure
* r_big
  - Prepare big.c to add gmp code
  - Implement r_big_{new, free} with libgmp
* r_anal
  - Change the type of {bb,fcn}->fingerprint to RNumBig
* r_flags & r_core
  - Add cmd 'af-*' which removes all flags
2010-05-24 11:15:32 +02:00
pancake
be12c8f284 * Added anal_java plugin (copypasta from r1)
- Split java_ops array into a separate object file
* Fix r_config.vapi and add RConfig instance in RCore definition
2010-05-23 14:31:18 +02:00
Nibble
2368a1e3b6 * r_bin_elf
- Fix section va bug
* r_anal
  - Store mnemonic in RAnalOp
  - Initial work on bindiff
2010-05-23 12:51:37 +02:00
Nibble
934112d2b7 * r_anal
- Fix bb->type resolution
  - Use bb->type as flag
* r_core
  - Mofify ab+ to accept more than one type
2010-05-21 19:20:42 +02:00