Commit Graph

1280 Commits

Author SHA1 Message Date
Nibble
7de9646195 * Merge 2011-02-04 14:07:56 +01:00
Nibble
1d83a7ba25 * Some optimizations in r_anal
- bb's are included in fcn struct
  - analyze bb's and fcn's all together
* Update some vapis
* Fix build
2011-02-04 14:03:59 +01:00
pancake
8924841072 * Some more work on r_core_sysenv*
- fix api, but still not using BLOCK or so
* Fix help for ??? and !?
* Upgrade swig/configure.acr to 0.6.9
2011-02-04 11:30:08 +01:00
pancake
9c8aa28a9a * Some better help messages
* Added asm.lineswidth (fixed width for reflines)
* Added 'aoe' stub command
2011-02-03 09:31:50 +01:00
pancake
fdd8ed6bc1 * Use r_reg API from r_anal in order to retrieve info for r_syscall
* Hacky support for software interrupts in anal.x86im plugin
* Added 'B' key to toggle automatic blocksize
2011-02-03 00:57:29 +01:00
pancake
1f1a36c817 * Initial implementation of the r_anal_aop_execute api
- It's like r_vm, but using r_anal
  - r_vm is going to be deprecated
* Added r_mem_set_num()
* Remove deprecated asm/t/fastcall example
* Fix warnings in r_syscall_regs
  - Integrated with r_syscall_use()
  - Fix r_syscall_reg() out of bound bug

--HG--
rename : libr/syscall/regs.c => libr/syscall/fastcall.h
2011-02-03 00:20:39 +01:00
pancake
1f953579ea * Fix build 2011-02-02 13:23:44 +01:00
pancake
965a577af2 * More work on the r_anal/r_syscall refactoring for calling conventions 2011-02-02 13:05:48 +01:00
pancake
259883630b * Move r_asm_fastcall into r_syscall_regs (-42LOC) 2011-02-02 13:02:20 +01:00
earada
dd9f3b000b * Fix dalvik big opcodes
* Asm bufsize is 1024 again
2011-01-31 00:26:07 +01:00
pancake
bc38178050 * Add support for multiline macro definitions 2011-01-27 09:31:52 +01:00
pancake
4eeb7b1331 * Nicer inc method for visual key
* Clean warnings in r_search test programs
2011-01-27 01:12:02 +01:00
pancake
edd47d4229 * Fix visual glitches when hexdump and code are mixed
- Fix scrollup/scrolldown using new core->inc var (yay)
2011-01-27 00:45:16 +01:00
pancake
b88bac0dd1 * Reduce r_macro recursivity limit to 1024
- fixes stack exhaustion segfault
2011-01-27 00:05:49 +01:00
pancake
cec3935b00 * Fix r_cmd_macro '(' command now works 2011-01-26 23:40:16 +01:00
earada
5cede93f83 * Fix home/end keys in gnu screen (Tnxs rvalles) 2011-01-26 23:31:15 +01:00
pancake
9c55e3694b * Fix build of r_fs 2011-01-26 22:10:35 +01:00
pancake
2c3edbbbf5 * Add missing cc.c 2011-01-26 22:01:38 +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
pancake
a1fa245517 * Add missing dalvik.mk 2011-01-25 16:29:59 +01:00
pancake
92073badf0 * Fix build for r_fs partmaps 2011-01-23 23:58:46 +01:00
pancake
e24453348a * Chop last '/' in r_fs_mount
* Add support for other partition types:
  - msdos, acorn, bsdlabel, amiga, sun, sunpc, apple, gpt
* Honour make return values
2011-01-23 21:54:18 +01:00
pancake
47b29fd69d * Fix previous commit (oops) 2011-01-23 18:44:38 +01:00
pancake
c6b37c3e26 * Fix r_bin_elf for ppc, avr and 68k binaries 2011-01-23 18:32:58 +01:00
pancake
afb634f97d * Add support for ppc64 disassembler 2011-01-23 18:19:03 +01:00
pancake
c79c75c9e7 * Use adaptative blocksize as reported by rvalles
- Only affects disasm and hexdump in visual mode
2011-01-23 17:48:31 +01:00
pancake
9cd07bd9d2 * Added r_cons_resize() and _interrupt() RConsEvent callbacks
- Use _resize() from visual mode, so redrawing is now cleaner
* Minor bug fixes
2011-01-23 13:12:16 +01:00
pancake
3c2739a8c2 * Add ewf plugin using the new r_io plugin abi
* Fix io ptrace |pid and fix w32dbg for new r_io
2011-01-23 00:18:26 +01:00
pancake
d35722d83f * Use INSTALL_LIB to install libraries 2011-01-22 23:52:37 +01:00
pancake
f92ca2da8a * Fix r_io_redirect and debugger IO
- Get PID from inner struct instead of aliased by fd
2011-01-22 00:57:43 +01:00
pancake
61e3cd4e50 * Fix some warnings thanks to toys/makewarn :D 2011-01-21 15:05:55 +01:00
earada
2fd808e19b * Fix rafind2 build
* jk visual commands seeks an opcode size
2011-01-21 10:21:04 +01:00
pancake
3ab9e61c22 * Do not show registers if sync fails
* More work on the io refactoring
2011-01-21 09:17:14 +01:00
pancake
bbda7ed61e * Much more fixes for the new r_io
- r_io_malloc plugin is now working
  - r_io_size now accepts only one argument
* Fix nullptr bug in r_fs
2011-01-21 00:21:32 +01:00
pancake
ed8d076cbe * Fix r2 -n, remove r2 -t
- Some more fixes related to r_io. still more stuff to do
2011-01-20 23:28:20 +01:00
pancake
39f77a430f * Huge r_io refactoring
- Many things are broken in this commit
2011-01-20 22:52:16 +01:00
earada
0283c92f6e * Initial import of Dalvik (Android VM) disassemble plugin
* Change opcode buffer size to 3218 (need refactor)
2011-01-19 00:39:28 +01:00
pancake
74ff5af871 * Fix for r_io_resize -- needs merge with refactor 2011-01-17 15:28:40 +01:00
pancake
4bc2043d78 * Fix build order for r_fs 2011-01-17 08:35:57 +01:00
pancake
5f925ba1f8 * Fix libr_fs on OSX, restrict FS plugins to the only ones
that compile fine everywhere. Need more work and testing
2011-01-14 20:53:36 +01:00
pancake
1f4b2af502 * Transitional commit removing some nested functions and
simplifying/cleaningup grub code. Still needs more cleanup for OSX
2011-01-14 19:38:22 +01:00
pancake
d0af9bcc66 * Added support for listing MSDOS partitions
- Other partition types (leeched from GRUB) will be added soon.
  - Added 'mp' command to display partitions
* Clean warns and fix some bugs in the grub code
2011-01-14 14:41:56 +01:00
pancake
08e37d54ab * Added r_fs support for the following filesystems:
fat, ntfs, cpio, tar, hfs, hfsplus, udf, iso9660,
  reiserfs, ufs, ufs2, xfs and jfs
* Added vapi files for r_fs
2011-01-14 09:45:33 +01:00
pancake
28b9e436c6 * Rename r_fs_load to r_fs_slurp 2011-01-14 01:05:23 +01:00
pancake
b8b87f050e * Initial working r_fs API with ext2 fs
- Support file reading and directory listing
* Fix build
2011-01-14 01:02:20 +01:00
pancake
ca432e3f04 * Initial import of the 'r_fs' API
- Allows to mount filesystems in virtual IO
  - Only dummy ext2 plugin ATM
  - Added 'm' command in r2 to manage mountpoints,
    list directories and retrieve files
  - Bonus: hacky version of grub/fs code to use it
    as a standalone API. Plugins will use it
  - API is quite simple and limited, read-only access
2011-01-12 00:01:06 +01:00
pancake
dcb1f9d9fd * Initial draft of the r_fs api 2011-01-07 18:22:02 +01:00
pancake
16eefe9762 * Fix w32 mmap implementation for r_mmap api 2011-01-07 00:42:27 +01:00
pancake
7454f9f224 * Add missing method definitions in r_flags vapi 2011-01-06 23:20:18 +01:00
pancake
92f34b6183 * Add missing define for osx debugger on arm and powerpc 2011-01-04 17:30:10 +01:00
earada
93413ab59e * Oops, type error un r_util 2011-01-02 14:45:36 +01:00
earada
0eaceff162 * Fix function asciiart in r_print_disas
* Add mmap & mmap_free windows support
2011-01-02 14:39:25 +01:00
earada
3e11ab4282 * Use r_cons_free to free the cons buffer. 2010-12-26 23:38:53 +01:00
Nibble
5b9fd63c1f * More work on gdiff
- Follow basic blocks instead of diffing fcn->addr+fcn->size
    vs fcn2->addr+fcn2->size
* Remove unused r_core_anal_graph_fcn
* Fix build
2010-12-24 16:58:27 +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
pancake
b0390669c7 * Sync r_flag vapi
* Fix r_util vapi for latest vala
  (no default values for out parameters)
2010-12-24 01:43:34 +01:00
earada
cf1d6a1d78 * Use RList in RFLags 2010-12-24 00:51:01 +01:00
Nibble
0b9ca8a330 * Fix bug in udis86 with calls in 64bits (need more testing)
- 32bits operator + 64bits pc = 64bits address
2010-12-23 02:11:28 +01:00
pancake
ecf0988c21 * Use 'native' debugger backend by default
- Fixes 'dp*' when not running as debugger mode
  - Added r_debug_pids () (sync vapi)
  - Fix possible segfault if no anal given to dbg
* Some cosmetic fixups
2010-12-22 01:23:35 +01:00
pancake
7725fc7136 * Fix segfault in r_list for null pointers 2010-12-17 10:58:38 +01:00
pancake
13b04ecaf6 * Fix build for w32 2010-12-16 13:55:20 +01:00
pancake
29a870a269 * Minor cosmetic sugar fixes in CODE XREFs
* Some more fields into r_io vapi
2010-12-15 11:32:39 +01:00
pancake
b53ea8bec1 * Apply @earada patch
- Fixed redundant check in r_hex_str2bin
  - Initialize fd in r_io_new
  - Added Haret IO (WinCE app) plugin
2010-12-13 10:41:28 +01:00
pancake
ef9e96c03d * Some cosmetic fixes in 'pd' 2010-12-13 00:49:33 +01:00
Nibble
058631a555 * Only compare fcns by name if it begins with "imp.", "sym.", "fcn.imp." or "fcn.sym."
- Avoid problems with functions named fcn_offset
2010-12-09 16:04:55 +01:00
Nibble
c2da7cf5a2 * Compare fcns with the same name first in gdiff 2010-12-07 16:52:33 +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
28d0a62430 * Change gdiff API so it takes 2 core's as args
* Don't output diff info and vars in 'afl' for loc's
* More refactoring of gdiff
2010-12-06 03:34:44 +01:00
Nibble
ea73472ee6 * Add optimization in gdiff based on function size boundaries
- Makes bin diffing 5 times faster
2010-12-05 19:43:12 +01:00
Nibble
92baebdadd * More optimizations in gdiff
* Fix af* output
2010-12-05 10:44:27 +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
b3e34d3270 * Free fingerprints in gdiff when they have been used 2010-12-04 19:49:13 +01:00
Nibble
e88482e1b7 * Remove DEBUG messages from gdiff 2010-12-04 15:25:45 +01:00
Nibble
c254af504f * More optimizations in gdiff
* Fix the usage message of radiff2
2010-12-04 15:24:39 +01:00
Nibble
f50fc41794 * Huge refactoring of gdiff using Levenshtein distance and binmasks 2010-12-04 15:14:53 +01:00
pancake
5e2fd3197e * Added dummy r_bin_demangle 2010-12-03 14:53:06 +01:00
Nibble
fc11acc128 * More work in var analysis
* Put RAnalVar->type and RAnalVar->dir together
2010-12-03 13:52:11 +01:00
pancake
b955a66459 * Apply patch from @earada
- Fixes sha1 and md5 issues on 64bit
2010-12-02 22:32:49 +01:00
pancake
96c998fe78 * Fix XREFs and xdot graph output 2010-12-01 23:30:00 +01:00
pancake
1ccef0d493 * Fix some fd leaks in r_socket library 2010-11-30 13:54:07 +01:00
Nibble
f55fb1accf * Fix r_anal_var_add() call in cmd.c 2010-11-29 20:11:49 +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
pancake
61cf8cd3aa * Remove unused libr.pc.acr
* Set procmod group in osx make target of r2 bin
2010-11-29 10:27:11 +01:00
pancake
8aded92fa6 * Added C stub for plugin.vala
- Major cleanup in vapi/t Makefile
* Fix a format string bug in flags
2010-11-29 10:22:38 +01:00
Nibble
717713c3b2 * Rename cmd 'a' to 'aa' (analyze all) 2010-11-27 15:03:00 +01:00
Nibble
0ffefbc320 * Modify cmd 'a' to analyze all the fcn's and bb's of the bin 2010-11-27 04:20:19 +01:00
pancake
63ac407fa4 * Add initial support for OSX on 64bits 2010-11-26 17:16:06 +01:00
pancake
6839391400 * merge 2010-11-26 14:49:32 +01:00
pancake
64fedcd772 * merge 2010-11-26 14:41:47 +01:00
Nibble
ed33751a8e * Add cmd 'a [@ addr]'
- Helper for af+ab (analyze functions and basic blocks)
* 'a?' shows analysis help
2010-11-26 13:13:45 +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
pancake
7c844bb576 * Fix all vapi files fixing valaswig bindings
- Implement missing methods
2010-11-24 23:19:17 +01:00
Nibble
5c986e4464 * Fix bug calling r_anal_fcn_add() 2010-11-23 20:16:43 +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
pancake
2ea135690c * Fix build on OSX-32/64 2010-11-22 18:40:54 +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
pancake
75ac253a23 * Fix segfault in r_core_read_at 2010-11-22 01:27:20 +01:00
pancake
f9d33abbb4 * Fix signature of RCore.read_at in r_core.vapi 2010-11-22 01:22:27 +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
e8a09f4e87 * Fix some overlapping strcpy's (thx @earada!) 2010-11-20 18:35:40 +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
Nibble
cfc6dcea96 * Fix io_ptrace read in 64bits 2010-11-19 11:09:49 +01:00
pancake
96797846e9 * Fix io_ptrace_read when memory error occurs
- Fixes graphs in debugger mode
2010-11-19 00:49:05 +01:00
pancake
eb3de0a3f4 * Use memmove where needed (thanks @earada for the patch)
- Fixes probably segfaults in latest GLIBC
2010-11-18 12:17:55 +01:00
pancake
421208a0c7 * Replace main for binsym in r_bin
* Added dummy commands for r_debug_fork/clone
2010-11-18 11:41:17 +01:00
pancake
a4f1627681 * Fix build (thanks @earada) 2010-11-17 21:40:55 +01:00
pancake
6d515cc1a8 * Update and reorder TODO tasks
* Added r_file_mmap() functions in r_util
* Do not hash files bigger than 10MB
* Fix abspath() return value and signature
2010-11-17 21:15:34 +01:00
pancake
0aafe05b45 * Step now accepts pid+tid
* Fix attach in w32 debugger
  - use dpa and get first thread by default
* Mark with asterisks the selected pid/thread (dp/dpt)
* Fix reg_write in w32
2010-11-17 02:31:56 +01:00
pancake
4db5cded34 * Fix w32dist find command
* Display TODO message in r2 -L
* Implement rax2 -s - and rax2 -
* Honor dbg->tid in many places
* Implement basic stuff for dbg->reason
  - Only w32 and *nix atm
  - Not yet displayed or used
  - Added many new reason types in enum
* Fix w32 register map
* Handle attach:// in io_w32dbg plugin
* Implement w32 process and thread list
  - You can now select the thread
  > dp      # list pids
  > dp=1424 # attach to pid
  > dpt     # list threads
  > dpt=580 # select thread
* Added dummy code to list windows
2010-11-17 00:56:48 +01:00
pancake
d2c2c27607 * Added /proc/pid/task support to get thread list in Linux
* Initial work on boolt typedefinition
2010-11-16 18:19:51 +01:00
pancake
1a02d7b403 * Implement r_core_search_cb() method
* Added boolt and ut8p macros (looking for better names)
2010-11-15 11:06:10 +01:00
pancake
49ab1886c2 * Fix branch analysis in arm thumb
* Various unnecessary syntax changes
2010-11-14 16:38:17 +01:00
pancake
a098f9ae99 * Fix fd leak bug 2010-11-12 13:26:58 +01:00
pancake
10637ec71f * Fix permission parsing in OSX 2010-11-11 17:53:49 +01:00
pancake
fadaa252e5 * Fix build in non-darwin 2010-11-11 12:00:17 +01:00
pancake
edeee07ca2 * Initial implementation of process name listing on darwin/osx
* Fix build (r_debug_pid_new signature change)
2010-11-11 04:12:09 +01:00
pancake
dacab5e4bf * Initial implementation of r_debug_step_soft and _hard
- arm-darwin seems to not support stepping, mips follows
  - Delegate swstep responsability to r_debug api
* Implement set registers in arm-darwin
  - write in memory is not yet working
* Some fixes in memory regions list in arm-darwin
2010-11-11 03:13:44 +01:00
pancake
19c90096ff * Fix read registers in darwin-arm 2010-11-11 02:00:10 +01:00
pancake
cfa24e1879 * Add XML to ldid r2 debugger for iOS
* Fix build of the r2 debugger on darwin-arm
* Implement list of threads and memory regions on darwin-arm
  - just a draft, needs more work
* Add attach:// IO handler to mach plugin
* darwin does not needs -ldl
2010-11-11 01:09:27 +01:00
pancake/n900
9580907a35 * Fix static and nonpic build with no gmp
* Needs to rerun configur-plugins
2010-11-10 10:45:47 +01:00
pancake
0719fbbfcc * Oops. add missing fix for previous commit 2010-11-10 03:59:56 +01:00
pancake
a6629c610c * Fix static compilation on Linux systems
- Not really portable, needs some work to fix w32 build
2010-11-10 03:55:27 +01:00
pancake
64a94329c5 * Fix segfault in mach0 parser 2010-11-10 02:19:05 +01:00
pancake/n900
c73cd38c73 * Implement search.find as proposed by @earada
- this commit has been done in my phone..needs testing
2010-11-09 21:18:39 +01:00
Nibble
31b0d33479 * Fix ret value in r_file_dump() 2010-11-09 18:09:37 +01:00
pancake
e15ecf7e79 * Fix warning noticed by iphone-gcc
- Bug in the compiler?
2010-11-09 18:08:07 +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
f3eb61189d * Add missing offset in RCore vapi and r_print in .pc 2010-11-05 00:59:05 +01:00
pancake
3a44d471f4 * Fixes for pkgconfig and vapi deps
* Apply patch from @astralia for rax2
  - support int->bin and bin->int
2010-11-04 13:19:36 +01:00
Nibble
d157655c2c * Release 0.6 codename "the cake is a pie" 2010-10-29 13:58:19 +02: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
pancake
9dc6a049b1 * Fix make -j for paralel builds
- use hacky 'waitfordeps.sh' helper script
  - speed up the build process
* Do not build libr2.so by default
  - Do not generate library archives (.a)
  - Fix build dependencies in vm/p/plugins.h
* Added --with-nonpic
  - Enable the .a generation
2010-10-29 03:10:10 +02:00
Nibble
35dc03713d * Bypass bp in the remainder continues
* Disable stop_all_threads temporarilly
  - Only step once in bypassbp()
2010-10-28 21:20:44 +02:00
Nibble
23083b105a * merge 2010-10-28 20:48:01 +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
7e76da88bb * Clean up some warns on w32 2010-10-28 14:17:40 +02:00
pancake
85232f4936 * Fix build on w32 2010-10-28 14:11:19 +02:00
pancake
ab75536dbe * Fix symstall with versioned libs 2010-10-28 13:16:58 +02:00
pancake
5d107aa50c * Fix build
* Fix soname for libr2.so
2010-10-28 13:12:14 +02: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
1b5ea31de4 * Use --soname with version number
* Fix redefinition symbol build issue with r_io-desc_free
* Fix compilation of python lang plugin for py>3
2010-10-28 03:23:42 +02:00
pancake
7767f79b35 * Added r_parse and r_print pkgconfig and vapis
* Fix all compilation problems of swig/
  - Many new APIs are now exposed to the bindings
2010-10-28 02:51:01 +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
37db11ac74 * Fix r2 initial seek in non-debug mode 2010-10-28 00:19:10 +02:00
pancake
23e6bfb679 * Add manpages for rarc2 rarc2-tool ranal2
* Use the library symlinking layout as reported by Debian
2010-10-27 22:17:55 +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
c2dd0f1126 * Minor optimization in r_core_prompt()
- Avoid the use of r_config_get_i
* Apply pancake's patch
  - fix cmd 'bp' with flags
2010-10-27 19:00:45 +02:00
Nibble
a3ff1f5261 * Fix initial seek in debug mode to pc (use sr pc)
* Complete 's' help
* Fix dietline echo in 'r2 -v' mode
  - Add cb for scr.prompt
2010-10-27 17:45:53 +02:00
Nibble
6d1aa00b42 * Fix r_file_slurp()
- handle correctly fread return value
2010-10-27 16:53:06 +02:00
pancake
0a294261aa * Many warnings fixed thanks to gentoo build and @astralia 2010-10-27 16:31:51 +02:00
Nibble
4b168c8748 * Fix build 2010-10-27 16:24:56 +02:00
pancake
979663ca30 * merge 2010-10-27 10:57:25 +02:00
pancake
fca584126c * Initial work on the versioned libraries support 2010-10-27 10:56:18 +02:00
Nibble
0a4860a331 * Refactoring and fix of r_cons_w32_print()
* Add support for '^]27m' (invert off) in win32 console
2010-10-27 01:53:40 +02:00
pancake
668ef5dd80 * Install plugins in versioned directory
${PREFIX}/lib/radare2/${VERSION}
2010-10-26 23:19:08 +02:00
pancake
89680b63f0 * Fix eflags parsing for x86-32/64 debugger
- added ?f and ?b commands to parse bits and flags
2010-10-26 21:00:54 +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
8e03f35762 * Apply patch from @earada
- Fixed the push/pop arm compile. Thanks @vytis0 for report!!
  - Use 128 bytes in opcode length.
  - Use an array for store all registers parsed.
  - Now can use more than 2 regs.
* Fix warnings in flags/name.c
2010-10-25 00:57:03 +02:00
Nibble
063d34066c * Fix byte selection in cursor mode (pd view) 2010-10-24 23:09:07 +02:00
Nibble
b41f4b5380 * Use '[27m' (invert off) instead of '[0m' in r_cons_invert
* Fix colorize in visual mode (pd view) when cursor is enabled
2010-10-23 21:40:58 +02:00
Nibble
c79afe3568 * Add var vm.arch
* Fix vm arch setup at startup
* Fix flag set in visual mode when cursor is enabled
* Filter string names before adding flags in r_bin_load
* Fix r_flag_name_filter (do trim)
* Fix r_sys_rmkdir
* Update TODO
2010-10-23 14:27:13 +02:00
pancake
431e626680 * Fix $$$ variable
* Do not set io.va twice
2010-10-22 01:16:32 +02:00
pancake
f7dd1dd66f * Build w32 python bindings in build.sh
* Added 'drb' command to show bytes of GPR
* Fix signature of r_print_hexdump and _hexpairs
* Enhace r_reg test case
* Fix swig/Makefile w32dist target
2010-10-19 22:17:58 +02:00
pancake
6ea3adb5aa * Bump revision to beta 0.6
* Fix bug in armass noticed by @earada
2010-10-19 19:53:29 +02:00
pancake
a25065fa75 * Honor print->cols in visual {j,k} 2010-10-19 13:17:25 +02:00
Nibble
65bd1b53e9 * Fix block read in visual mode
* Use a more reliable way for fixing the got_offset issues
* Remove ELF_GOTOFF_MASK
2010-10-19 12:57:28 +02:00
pancake
f9e6ca28cf * Fixes in swig/ for OS type selection
* Move rsc2 into binr/

--HG--
rename : rsc2/rsc2.c => binr/rsc2/rsc2.c
rename : rsc2/scripts/intel2att => binr/rsc2/scripts/intel2att
2010-10-18 20:47:13 +02:00
pancake
8149bab431 * Remove \r (thanks @earada) 2010-10-18 11:54:12 +02:00
pancake
bbdf96a97d * Some work on the analysis of the cursor bug 2010-10-18 11:38:52 +02:00
pancake
c02df0ba66 * Restore old asmserv.c
- Fix build
2010-10-18 01:52:44 +02:00
pancake
9313a158d6 * Added compilation support for python bindings on Windows
- Documented in doc/windows
* Use single linked list pointer in rbin->rcore
  - Thanks @earada :)
2010-10-18 00:00:17 +02:00
pancake
d0e3a3b0e3 * Fix w32 debugger register profile
* Remove \r in asmserv.c
2010-10-17 23:33:58 +02:00
pancake
9f7040dbf8 * Fix warnings in asmserv on windows
* Some alloca->malloc fixes for w32
* More error checking in r_sys_rmkdir
  - Uses the new r_sys_mkdir_failed() api
  - works on windows and posix
* Disable asm.dwarf when the plugin fails to init
  - Displays a warning message
* Added 'e scr.cols=16'
  - Determines the width of the hexdump (px, x)
  - Used also by Visual mode hjkl dimensions
2010-10-17 23:03:54 +02:00
Nibble
7fe2f823e7 * Fix build for win
* Fix string rva in r_bin
2010-10-17 20:38:19 +02:00
pancake
5d946a8b21 * Apply some fixes for w32
* More nullptr checks
  - Fix 'drp'
* Fix build
2010-10-14 19:01:14 +02:00
pancake
93e69bab0e * Fix null pointer issue related to r_syscall and r_core 2010-10-14 17:06:09 +02:00
Nibble
bfbd12ed3c * Don't add symbols as functions before analyze them
* Update and simplify gdiff
2010-10-13 18:51:10 +02:00
pancake
d607e969bc * Fix division by zero in VM code when using ATT syntax
- use intel syntax when running VM code from disasm loop
2010-10-13 18:07:55 +02:00
Nibble
add2efee74 * Fix reloc offset resolution in r_bin_elf 2010-10-13 04:00:32 +02:00
Nibble
11e8d6a1da * Fix va issue in dbg mode 2010-10-13 01:23:27 +02:00
pancake
ead5ebdd32 * Oops. fix debugger attach 2010-10-13 01:00:39 +02:00
pancake
01b56da424 * Remove -l flag in rarc2
- Replaced by rarc2 -a
* Fix build
2010-10-13 00:43:02 +02:00
pancake
8f9dbbd0d1 * Remove some use of alloca()
* Fix lock when using 'r2 -d'
* Invalid program name results in error, not warning
2010-10-12 13:22:19 +02:00
Nibble
17542ef3de * More work on r_bin and r_util vapi's
* Minor aesthetic fix in core/file.c
2010-10-12 07:08:03 +02:00
pancake
dac5cf1b08 * Apply patching fixing various bugs on w32
- Some segfaults resolved and bugs identified
  - Thanks @mrgadix :)
2010-10-12 01:18:17 +02:00
pancake
35adb1690d * Apply fix in rbin->core integration from @earada 2010-10-12 01:16:39 +02:00
pancake
b716077518 * merge 2010-10-11 17:12:08 +02:00
pancake
f1e46a88f6 * Do not run .!rabin2 from r_core
- Use internal APIs to load binary information
  - Startup time reduced about 2-3 times
  - Thanks @earada for this patch!
2010-10-11 17:11:43 +02:00
Nibble
f29444ab20 * r_core
- Add var asm.functions to show/hide function analysis in disasm
  - Take into account asm.{xrefs, functions} in disasm
* vapi's
  - Add bin to RCore in r_core.vapi
2010-10-09 19:13:10 +02:00
Nibble
b3ac5bd4d4 * r_core
- Add helpers r_core_disassemble_instr() and r_core_disassemble_bytes()
* bindings
  - Fix go detection
  - Update r_core.vapi
2010-10-09 13:54:08 +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
cc4e664533 * Do not show cursor in visual mode when cursor is disabled 2010-10-08 00:48:07 +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
284abdfb87 * Added partially supported ldr{hb} and str{hb} opcodes for armthumb
- needs more parse checking
2010-10-07 19:16:16 +02:00
Nibble
44eff205c1 * r_core
- Fix DATA in disasm
  - Correct the number of lines showed with 'pd n'
* Update r_core vapi
2010-10-07 13:02:07 +02:00
pancake
6b3883cc43 * More opcodes supported by the arm thumb assembler
- Just missing ldr{b,h} and str{b,h}
* Added armthumb_length() function to retrieve opcode length
2010-10-07 11:20:12 +02:00
pancake
a8c641a0a6 * Initial import of the ARM thumb assembler
- Not all opcodes are supported, partially done
2010-10-06 21:22:56 +02:00
Nibble
124aa07a96 * Add r_core_asm_bwdisassemble for backward disassemble resolution
* Add example using bwdisassemble in swig/vapi/t/bwdisassemble.vala
* Add field len to RCoreAsmHit
* Update vapi's
* Fix memory leak in r_core_asm_strsearch()
* Fix several vala examples
* Fix r_list_iterator warning in vala
2010-10-06 18:04:47 +02:00
pancake
b21584e06c * Initial import of the thumb arm disassembler
- based in C++ code of KennyTM in networkpx.googlecode.com
  - Added 'armthumb' r_asm plugin (16 bit mode)
2010-10-06 00:35:33 +02:00
Nibble
04d4053f67 * r_io
- Remove r_io_map_list from r_io.h (deprecated)
* vapi's
  - Update r_io.vapi
2010-10-05 21:43:14 +02:00
Nibble
fbf99edafa * r_asm
- Remove dupped function signature from r_asm.h
* vapi's
  - Fix {r_asm, r_bin, r_util}.vapi
  - Update r_bin.vapi
2010-10-05 20:30:05 +02:00
Nibble
a83355f0b1 * De-warn dyldcache in 32bits
* Add dyldcache.mk to libr/bin/p/Makefile
* Update reloc.vala
2010-10-04 23:05:30 +02:00
pancake
f99e946b9b * Initial import of rasc2 (copypasta from r1) 2010-10-04 19:43:40 +02:00
Nibble
836c91c32a * r_util
- Fix r_sys_rmkdir
* rabin2
  - Generate folder structure on extract operations
2010-10-04 13:57:48 +02:00
Nibble
b1cdfcc889 * Fix build 2010-10-04 12:46:27 +02:00
pancake
e8f8e72896 * Added r_bin_get_object() to cache binary information
* Initial work in r_core_bin_load()
  - Integrating rabin2 inside core
2010-10-04 10:55:43 +02:00
Nibble
afedad76bb * Fix memory leak in bin_mach0 2010-10-04 04:20:19 +02:00
Nibble
a1d0887ca8 * Fix build (update core/anal.c with the last changes in r_bin)
* Implement extract in rabin2
2010-10-04 04:01:25 +02:00
Nibble
cec1f3fa73 * r_bin
- Refactor r_bin to work better with big fatbins
  - Don't load all sub-bins in memory
    Only load the fatbin and the selected sub-bin
  - Add r_bin_set_archidx() and r_bin_list_archs()
  - Update t/{rpathdel.c, test_meta.c}
* rabin2
  - Use '-f str' to select sub-bin by name
2010-10-04 03:46:58 +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
fd084aca33 * Fix segfault in dyldcache 2010-10-02 18:20:46 +02:00
Nibble
d65ad968d7 * r_bin
- More work on dyld cache plugin
  - Rewrite headers, commands and segments
  - Fix offset for syms, imports, sections...
* r_util
  - Add r_buf_append_bytes
  - fix r_sys_rmkdir
* Update TODO
2010-10-02 17:21:51 +02:00
pancake
17a6fde707 * Add r_sys_rmkdir and make r_sys_mkdir a define 2010-10-01 19:05:07 +02:00
Nibble
a7d6fc0cc7 * Detect bin sizes in dyld cache plugin 2010-10-01 13:22:37 +02:00
Nibble
48dd408e45 * Merge
* Minor fixes in r_bin
2010-10-01 11:58:11 +02:00
pancake
8081f02601 * Fix uninitialized variable in rabin2
* Fix null pointer handling in rbin when no xtr plugin found
* Initial draft code for the x86 debug registers implementation
* Fix avr* command
2010-10-01 11:10:59 +02:00
Nibble
41bd2fd0ea * rabin2
- Show filesize in '-x' output
  - Select "sub-bin" using '-a arch_bits' and '-n filename'
* r_bin
  - Add argument "name" to r_bin_set_arch
2010-10-01 10:09:50 +02:00
Nibble
4b558bec3b * rabin2 -x uses filename.arch_bits as output file
* store full path in dyld cache filenames
2010-10-01 08:12:43 +02:00
Nibble
987d8599f9 * Initial implementation of the RBin extractor for dyld cache
* Add bin_xtr_dyldcache to plugins.def.cfg
* Show bin name in the output of 'rabin2 -A'
* Minor fix in rabin_list_archs() in rabin2
2010-10-01 04:26:52 +02:00
Nibble
e02c81ddf1 * r_core
- Minor fixup in r_core_asm_strsearch
* vapi
  - Add asmsearch.vala
  - Some updates
2010-09-30 20:55:20 +02:00
Nibble
df9434b1ec * Make r_core_asm_strsearch more API-friendly
- return RList of RCoreAsmHit's
  - Add helpers for list handling
* Add type RCoreAsmHit
* Show hit code as comment with '/c', eg:
    [0x00402350]> "/c jmp e; ret"
    f hit0_0 @ 0x004078e8   # jmp eax; ret 0xffbc;
    f hit0_1 @ 0x00409416   # jmp ebx; ret 0x8b48;
    f hit0_2 @ 0x0040ded4   # jmp ecx; retf ;
* Update r_core vapi
2010-09-30 19:25:47 +02:00
Nibble
4369761655 * Fix typo in printf 2010-09-28 19:57:02 +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
e5bc46da65 * Update r_anal with the changes introduced in r_bin 2010-09-24 21:30:33 +02:00
Nibble
483ab6160b Apply @earada's patch (thx!)
* Improving rax2
  - Support for many bases.
  - Add -s flag for transform byte to bin (ej: "48454c4c4f" to "HELLO")
  - Add -e flag for endian swap.
* New r_num_to_bits converts nums into binary representation.
2010-09-24 21:25:23 +02:00
Nibble
793dae395d * Massive refactoring of r_bin
- Add support for fatbins (currently only fatmach0)
  - Minimize creation of r_buffers
* rabin2
  - Add flag -A for listing archs
  - Add flags -a and -B for selecting arch
  - In the next commit -A and -B will be removed and -a will work
    with the following format:
    [-a arch bits] for selecting arch
	[-a] for listing them

--HG--
rename : libr/bin/p/bin_fatmach0.c => libr/bin/p/bin_xtr_fatmach0.c
2010-09-24 21:23:13 +02:00
pancake
d71fcd2708 * Do not show color prompt in windows
* Fix build on w32
* Finish the symgraph script
2010-09-24 19:04:33 +02:00
pancake
124786c1ac * Added 'drd' command to show only modified regs
* Added r_list_foreach_prev()
* Add RSyscallPort to handle Hardware I/O ports
* Remove libr/TODO and refactor /TODO
* Link with 'ld' in rarc2-tool for nasm
2010-09-24 16:45:56 +02:00
pancake
eb6dbb2245 * Initial draft implementation of hardware breakpoints
- use specific ptrace() calls in linux/freebsd to change regs
  - hwbp are not yet working, just basic DRX get/set
  - generic interface to handle hw bps in x86-32/64
  - needs to import DR# handling code from r1
2010-09-24 05:41:54 +02:00
pancake
84dd63b743 * Add 'bf' command to change block size based on flag size
- Added help in 'b?'
* Added support for bit-collection registers
  - eflags is now displayed as a string
  - debug/p/debug_native.c needs a correct x86 flag string
* Fix segfault when listing empty register sets
2010-09-24 04:09:39 +02:00
pancake
46aa9f5f7e * Implement stacked register storage
- Add support for register diffing
  - Colorize modified registers are step/cont
  - Add command 'dro' to show old register values
  - requires make clean
2010-09-23 20:42:35 +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
pancake
022e6c96f0 * Add pt command for print times (Thanks @earada for the patch)
- pt prints times in unix format
  - ptd prints times in dos format
  - ptn prints times in ntfs format
* Add cfg.datefmt in global config to define the format output of 'pt'
2010-09-23 12:59:54 +02:00
Nibble
49dceaaffd * More work on anal_x86_x86im refactoring 2010-09-22 18:31:15 +02:00
pancake
b339189b5f * Added r_reg_arena_set and r_reg_cmp in order to implement regdiffing
* Added R_DBG_REASON enums
2010-09-20 14:02:45 +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
441456767a * Fix define types in r_types_base.h
- now swig assigns const types correctly in go bindings
  - simplify fixgoswig.sh while the patch I've done for
    swig adding iterators support is not commited
2010-09-16 13:20:35 +02:00
pancake
6072a14eef * Simplify and fix rarc2-tool script
* Add support for /**/ style comments in rarc2
* Fix libr2.a warning message
* Fix .string "" directive in rasm2
  - Now works like in GAS. escape chars are handled
  - and quotes are stripped
2010-09-15 13:10:10 +02:00
pancake
9b2d428d1b * Initial hello world for rarc2 in ARM with GAS working
- Few changes needed to work with rasm
* Cleanup some warnings
* Handle foo() as a function definition, so emit frame in rarc
2010-09-15 10:50:43 +02:00
pancake
1b1599c6df * Support for some push/pop arm opcodes with 2 regs
* More fixes for rarc2 on ARM
* Implement .fill directive in r_asm
* Added asm.profile in r_core
* Added r_str_bits as a helper to display register flags
2010-09-14 11:22:31 +02:00
pancake
a9f8d52e59 * Many fixes in ARM assembler and rarc2 support for ARM
- Still not yet usable, but
* Add .byte and .hex in r_asm as directives
* Add test case for r_word api
  - Fix r_word_count()
* Also handle .globl (and .global) to keep GAS compatibility
  - TODO: add .word .fill .align and others
2010-09-14 01:29:09 +02:00
Nibble
5733497a0b * Add bindings for go
* Add swig/go/test-r_bin.go for testing r_bin from go
* Fix build for r_bp and r_search bindings
* Rename enum VarType to VarClass in r_anal.vapi to avoid conflicts
* Add flag -R to rabin_cmd in r2 start up
2010-09-12 12:31:18 +02:00
pancake
f4ada2309f * Handle numeric values as radix=10 by default in ollyasm
- Fixes rarc ATT output format for x86
* Fix commandline flags parsing in rarc2
  - Honor intel syntax with ".intel_syntax noprefix" header
    - GAS can now compile att and intel syntax rarc2 output
* Handle .intel_syntax and .att_syntax directives in rasm2
2010-09-10 13:17:24 +02:00
Nibble
09f5ca50a6 * Minor fixup in r_bin_elf 2010-09-10 11:46:30 +02:00
Nibble
159165fa13 * Add vapi/t/reloc.vala
- Print address for each relocation entry
* Update r_bin.vapi
* Minor fixup in r_bin_elf_get_relocs()
* Update TODO
2010-09-10 11:32:49 +02:00