Commit Graph

190 Commits

Author SHA1 Message Date
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
caee8a1009 * return r_anal_ret_end in fcn and bb analysis if an unknown opcode is found
* re-autogen using acr 0.8.4
2010-11-26 00:44:47 +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
1f8d80e37c * Zero out UCALL and UJMP opcodes in r_anal_strmask()
* Add imports to functions with name fcn.imp.* in r_core_bin_load()
* Fix bug in cmd 'zg', truncate ouput file
2010-11-21 19:01:41 +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
49ab1886c2 * Fix branch analysis in arm thumb
* Various unnecessary syntax changes
2010-11-14 16:38:17 +01:00
pancake
264f95a40e * Fix build in iOS 4.1 (darwin-arm)
- Honor CFLAGS everywhere
  - Use ut?? instead of uint??_t
* Add build instructions in doc/iphone
* Fix some out-of-range conditionals
2010-11-08 19:30:25 +01:00
pancake
1371965ae5 * Added 'w32beta' make target
- Distributes the build of r2 and r2-swig
* Fix some warnings on w32
2010-10-29 03:38:43 +02:00
Nibble
4ddde68f05 * Initial work on fixing bp&&dc&&dc
* Fix bug in io_ptrace when it writes to mem in 64bits
* Minor cosmetic changes in test_x86im
* Update TODO
2010-10-28 20:47: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
pancake/n900
c03fcdfa87 * Fix build for maemo (native arm/linux)
- This is a compiler issue, not arch related
2010-10-27 20:09:29 +02:00
Nibble
4b168c8748 * Fix build 2010-10-27 16:24:56 +02:00
pancake
8ed7004780 * Some fixes, null pointers and other beasts
found thanks to the python bindings
2010-10-26 18:24:14 +02:00
pancake
8149bab431 * Remove \r (thanks @earada) 2010-10-18 11:54:12 +02:00
Nibble
7fe2f823e7 * Fix build for win
* Fix string rva in r_bin
2010-10-17 20:38:19 +02:00
pancake
1fc70da3c9 * Analyze cmp/ldr/str opcodes in arm thumb
* Minor work to fix the cursor issues
2010-10-08 11:10:25 +02:00
pancake
daa5d0fd38 * Implement ldmia/stmia in armthumb_assemble
- added also: yield, wfe, wfi, sev, bkpt
  - fix ldr{bh} and str{bh}
* Initial implementation of the arm-thumb code analysis module
2010-10-08 00:27:38 +02:00
pancake
ee39ba239a * Add 'FS' #define for w32 and *nix
* Add support for thumb mode ARM disassembler
  - Workaround a warning in r_vm for arm-16
* More work on drx.c, but still not integrated
2010-10-04 00:42:11 +02:00
Nibble
7d1303292e * r_anal
- Fix segfault in anal_x86_x86im (64bits)
  - always show analysis warnings
* r_core
  - Fix /a output
2010-09-28 18:52:46 +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
cbdfff3dda * Minor fixup in anal_x86_x86im
- swapped dst src in *_MM_RG
2010-09-23 13:56:08 +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
183dffcd6b * Fix push immediate opcode analysis in basic x86 analysis
* Import simple arm assembler
* Some fixes for the brainfuck disassembler plugin
2010-09-08 19:49:34 +02:00
Nibble
59ac6a7c8b * Refactoring of /a
* ptrdepth works right with code and data refs
* More work in x86im plugin
  - Fill op.refs for more opcodes
  - Next step is a massive refactoring using r_anal_value
2010-09-08 11:52:10 +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
Nibble
3aeade1fa7 * Fix build of anal_x86_x86im 2010-08-27 18:38:51 +02:00
pancake
984b5c4d16 * Apply edu's project patch
- CC now ask for size, like the rest of r_meta_add commands
  - Project tracks meta, xrefs and sections information and actual offset
  - Visual add comment patched to use new r_meta_add comment with size
  - Documented C* in r_meta help.
2010-08-26 04:19:12 +02:00
Nibble
98a09ecd52 * ranal2
- Add stackop2str() and optype2str()
  - Output op type
* r_anal
  - Fix fcn analysis
  - Remove test_anal.sh
2010-08-25 02:27:42 +02:00
Nibble
aed141180e * ranal2
- Move t/test_anal to binr/ranal2
  - Add support for static/dynamic plugins
  - Add flag '-B' for binary input
  - Add support for ascci hexpairs
  - Now input can be given through argv or stdin
  - Output analyzed bytes
* r_asm & r_anal
  - Improve output of r_*_list

--HG--
rename : libr/anal/t/test_anal.c => binr/ranal2/ranal2.c
2010-08-24 22:16:03 +02:00
Nibble
c83d11ffd4 * r_asm
- Update udis86 to git head
* r_anal
  - Print more fields in test_anal
* r_socket
  - Rename socket_udp_connect to r_socket_udp_connect
* Fix build
2010-08-24 19:59:19 +02:00
pancake
3abfbe418d * Swap file-offset order in visual prompt
* Fix build
2010-08-23 12:39:00 +02:00
pancake
4d50a86855 * Initial implementation of the rap:// IO plugin
- RMT packet descriptions are in r_io
  - io.rap plugin is now compiled by default.
    $ rm -f plugins.cfg
    $ ./configure-plugins
* Some syntax fixes in r_vm
* RCore.r_core_server() method uses r_io_is_listener() to wait for connections
* Some minor fixes in r_socket
  - Add r_socket_read_block() fixes SIGPIPE and network issues
2010-08-22 21:42:08 +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
Nibble
5b9d174fbc * r_anal
- Add test_anal (to speed up the development of analysis plugins)
  - Add test_anal.sh (helper)
* r_core
  - Remove debug msg from the output of cmd 'i'
2010-08-20 21:47:58 +02:00
pancake
b6cc9ca1ba * Merge r_meta inside r_anal
* Display filename in title line of Visual mode

--HG--
rename : libr/meta/README => libr/anal/README.meta
rename : libr/meta/meta.c => libr/anal/meta.c
rename : libr/meta/t/test.c => libr/anal/t/test_meta.c
rename : libr/meta/type.c => libr/anal/type.c
2010-08-20 00:36:22 +02:00
Nibble
4b052b53ee * r_core
- Add cfg var anal.ptrdepth to define analysis depth for indirect references
  - Add support for indirect references to /a (needs more testing)
* r_io
  - Remove perror msg from r_io_read_i()
* r_anal
  - Minor fixups in arm and x86 plugins
2010-08-19 02:30:12 +02:00
pancake
1fa134ca4f * Clean many warnings
* Reasign TODO points
2010-08-16 17:48:47 +02:00
pancake
14516c7e9c * Implement 0x2e and 0x64-0x67 conditional jmp opcodes on x86
* Stop parsing commands at '#' char (comment)
* strclean command strings before executing them (fixes some issues with spaces..)
* V: is now honoring cursor position in cursor mode
2010-08-16 13:59:48 +02:00
pancake
ddd67f7f3e * initial parsing of 'jns' in anal_x86.c
* Use RList in RIOMap
  - deprecate _list
2010-08-16 11:24:13 +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
02251522ea * r_core
- Add cmd '/c' for searching asm code
  - Add config var search.asmstr
* build
  - Minor fixups in "make mrproper"
2010-08-11 17:48:02 +02:00
pancake
8a3c845627 * Implement @:blocksize syntax for commands
* Some reordering of the TODO
2010-08-10 12:34:10 +02:00
pancake
c101235102 * Analyze 'svc' opcode in ARM as software interrupt
- Interrupt number is stored in aop->value
  - Add dummy syscall table for osx/arm
  - Fix identification of syscall table on iOS bins
* Fix rabin2 -z on MACH0 binaries
2010-08-09 23:38:32 +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
Nibble
cfc552e156 * r_anal
- Fix bb split algoritm
* build
  - Fix "make clean" in bin/t
2010-08-02 09:54:50 +02:00