Commit Graph

550 Commits

Author SHA1 Message Date
Nibble
7f50350576 * rabin2
- Output offset (physical address) by default in radare mode
  - Add flag -v for printing virtual address in radare mode
2010-02-18 20:09:44 +01:00
Nibble
2f8f9efcee * Set cfg.va = false by default
* Fix disassembly of unknown opcodes
2010-02-18 19:43:23 +01:00
Nibble
fd02a34bc4 * rva is working, but needs more work
* Add S cmds to the output of rabin2 -rS
* Fix cmd 'S' (sections)
* Fix r_io_ptrace
* Add some missing signatures into r_util.h
2010-02-18 18:58:28 +01:00
pancake
09ad7c5b0f * Do not use 'extern' variables outside modules
- Fixes build in OpenSolaris
* Fix build of some io plugins
2010-02-18 16:36:55 +01:00
pancake
d6f95d33c3 * Lot of fixes in the vala/swig wing
- r_util is now bindable from swig !!
  - Added test cases for r_util
  - r_flist has been mirrored in C, to keep API consistent
* Rename RIO->seek into RIO->off
  - There's a method with the same name
  - Also rename list.h ->next and ->prev into ->n ->n
* Apply patch from whats fixing 'r_cmd_str' EOF for stdin (Thanks!!)
  - Added test program to ensure stdin food works
* Allow '-f -' to rasm2 (assemble file from stdin)
* Added test case in python using RBin, RAsm and RCC to compile
  and assemble a code to be injected in the given target program
2010-02-15 22:59:26 +01:00
Nibble
c738134c67 * Fix olly disasm in 64b 2010-02-14 12:43:52 +01:00
Nibble
9923fb7199 * Fix r_asm disassemble offsets 2010-02-13 18:14:01 +01:00
pancake
e0ed77af58 * Some work to fix r_asm
- assemble is now working
  - disassemble fails
  - Hard refactoring in massemble loop
  - Labels are now just 'text:'
  - Comments are supportes with '#' char
  - Labels are used as EQU directives
  - Added test program 'make test' in libr/asm/t
2010-02-13 03:00:27 +01:00
Nibble
bd2561af7f * Several fixups in r_asm and rasm2
* Fix ruby test for swig
* Add dummy perl test for swig
* Remove perl warning from swig/Makefile
2010-02-12 18:40:05 +01:00
pancake
caf507091d * Added -f flag to rasm2
* Implement .equ keyword in rasm2
2010-02-12 13:45:03 +01:00
Nibble
3d3bf594af * Rename r_array to r_flist (RArray to RFList)
* Add ruby test for r_bin
* Remove old r_array stuff from r_types.h
* Fix swig/Makefile to install ruby libs into ruby1.8 libdir too

--HG--
rename : libr/include/r_array.h => libr/include/r_flist.h
2010-02-12 11:45:22 +01:00
pancake
18b1b24065 * Merge heads 2010-02-12 03:17:56 +01:00
pancake
e110ce46da * Oops. reapply revision 383 2010-02-12 03:17:32 +01:00
pancake
922a86623f * Added pD command 2010-02-12 03:12:20 +01:00
pancake
5e4ae255fc * Fix pd # (display number of opcodes, not bytes) 2010-02-12 03:11:14 +01:00
Nibble
bf35f03ac8 * Fix bindings Makefile to support ruby1.9.0 2010-02-12 02:13:07 +01:00
pancake
54ada0d893 * Fix perl bindings installation
- Fix test examples
2010-02-12 01:17:31 +01:00
pancake
648f8ebe23 * Fix 'const char*' issue in valaswig bindings
- 'unowned string' is the correct vala type
  - Depends on valaswig tip
  - type checking is now more strict
* Build libr.so again for swig bindings
* Added test-r_bin.py
2010-02-12 00:43:11 +01:00
Nibble
d1aceaaa80 * Use valaswig-cc -x for generating bindings (iterator support and so)
* Remove deprecated r_bin.i.experimental
* Define r_array functions in r_array.h as inline static (list.h like)
* Minor fixups in some vapis and headers
* Update python examples
* Exclude problematic libs from swig/rules.mk (temporary)
2010-02-11 15:03:10 +01:00
pancake
4bbe54c148 * Added dummy flag -r in radiff
- Needs merge code from ired/bdiff
* Fix build of various vapi/t files
2010-02-10 00:09:48 +01:00
Nibble
a85474856c * Initial implementation of generic iterators
- Take a look at r_bin.i.experimental
* Rename "class" to "bclass" in r_bin to avoid troubles with c++
* Fix cast in list.h
2010-02-08 11:28:17 +01:00
Nibble
3796793590 * Add r_bin.deps
* Remove debug stuff from r_bin
* Remove outdated r_array stuff from r_util vapi
* Minor fixup in r_bin vapi
2010-02-08 01:36:52 +01:00
Nibble
4d9be45bae * Update r_bin and r_util vapis
* Fix vapi/t/bin.vala in accordance with r_bin.vapi
* Minor aesthetic fixes in util/t/array.c
2010-02-08 00:50:59 +01:00
Nibble
49331b1fd5 * Avoid r_bin_load to init items if bin->cur->load () cannot
load the bin
2010-02-07 15:49:23 +01:00
Nibble
fd3dbecbab * Fix segfault in r_bin_get_strings 2010-02-07 15:43:42 +01:00
Nibble
839eec0e79 * Fix buid for r_bin 2010-02-07 14:11:05 +01:00
Nibble
e5c37f89f6 * New implementation of r_array
* Huge refactoring of r_bin using r_array (not tested yet)
* Modify list.h in order to avoid collisions with c++ "new" keyword
* Random sanity fixes
2010-02-07 13:17:51 +01:00
pancake
822a33377b * Initial working implementation of the r_diff with delta in C
- Uses the mercurial's C algorithm for delta diffing
  - Remove r_diff_lines .. do we need a line-level diffing tool?
  - Remove -l flag from radiff2
* Rename RIo to RIO
* Added r_reg_arena_new () to simplify arena creation
  - Some sanity fixes in r_reg arena.c
* Add -C in rasm2 to output in C string format
* Initial working implementation of r_debug_execute to inject code
  in child process and restore memory and registers
  - Returns %a0 register value in ut64
* Added 'c' command to r_core - to compare -- just dummy
  - Will use r_diff
  - if rdiff callback returns NULL, we must stop scanning
  - old r_diff_buffers_delta is now named buffers_radiff
  - Added test files in diff/t/{file1,file2}
* Added doc/plugins documentation file
* Fix ${EXT_SO} in bin/p and asm/p (dejavu?)
* Added dummy asm_gas r_asm plugin
* Various random syntax fixes
* Rename 'dbg.ptrace' to 'dbg.native'
* Added r_debug_io_bind () to sync dbg and bp io_bind
* r_debug_map_list is now in a nicer format
* Append ${EXT_EXE} in diff/t
* Add missing util/log.c and vapi/r_line.vapi

--HG--
rename : libr/debug/p/debug_ptrace.c => libr/debug/p/debug_native.c
rename : libr/debug/p/ptrace.mk => libr/debug/p/native.mk
2010-02-05 12:21:37 +01:00
Nibble
20bf435bad * Add flag -@ [addr] in rabin2 to show the section,
symbol or import which is at addr. Eg:
  $ rabin2 -i@ 0x004020c0 /bin/ls
  signal
2010-02-04 15:46:41 +01:00
pancake/arm
703ae61623 * Initial working implementation of r_debug_map_* API
- Little integration from r_core_cmd (dm show maps)
  - Uses RList. Allows user and system defined maps
  - Added backend implementation for BSD and Linux
  - mem.c -> map.c
* Fix some more random warnings
  - Rename rList into RList .. as it should be
  - Added r_list_unlink method
* Rename MALLOC_STRUCT as R_NEW ..shorter and smarter
  - Needs propagation

--HG--
rename : libr/debug/mem.c => libr/debug/map.c
2010-02-04 13:23:53 +01:00
pancake/fluendo
54c70fc87c * Added 'drn' debug register name command
- Used to retrieve cross-platform register names
    from specified role. (pc, sp, bp, a0, ...)
* Fix register roles in arm and enhace a bit more the
  r_reg_profile parser to handle some weird situations.
* Fix all build warnings related to libgdbwrap
* Added r_reg_get_name_idx .. this way {get,set}_name
  get the same parameters.
2010-02-03 18:15:31 +01:00
pancake/fluendo
3a3a9b03f3 * Add check for lua5.1 before building the lang plugin
* Fix segmentation fault in r_io_read
  - Only happening when debugging (4 byte overflow)
* Remove |reg command from r_io
2010-02-03 16:57:44 +01:00
pancake/fluendo
c02ef87ac2 * Add support to ARM for the debugger
- asm.arm plugin is now embedded into r_asm as static plugin
* Added register alias names for r_reg
  - Add register names for x86/32/64/arm
  - pc, sp, bp, a0, a1, a2, a3
* Do not build lua5.1 if no lib found
* Enable cfg.ffio in debug mode
* Some code simplification in r_asm
  - Fix a negative offset bug in elf on ARM binaries
2010-02-03 14:34:00 +01:00
pancake
f343c4d74f * Fix delta seeking (do not allow seeks <0)
* Out of file reads (padding) filled by 0xff
* Added r_sys_cmd () to wrap r_system()
* Fix debug registers command to display segment and flag registers
  - Some draft changes in r_debug (signal handling and backtrace)
* Fix warnings in r_line
* Many more indentation fixes
  - Added st32 and st8 basic types
2010-02-02 11:09:52 +01:00
pancake
2b819bba83 * Added 'o' command to open, close, list and map files
* Many syntax standarization fixes
* Clean up some warnings
2010-02-01 11:55:56 +01:00
pancake
a1ada7a036 * Import 'S' command from r1 into r_core
- Allows to manipulate r_io_section
  - r_io not yet tested to work with this
* Added cfg.ffio eval key in r_core to interpret unreadable
  blocks as filled with 'ff' (fakes real IO), useful for
  searchs, bypass IO errors and make visual seeking sweet
  - False by default
  - Does not supports partial reads, so it can fake if seeking
    on non-aligned memory addresses
* Added install-bins and install-test-bins target
  - Splitted from install
  - Install 'r2' as an alias for 'radare2'
2010-01-31 14:22:27 +01:00
pancake
f974fea7da * Many fixes in r_io and r_anal from r_core
- Reference code lines are displayed again
  - Optimize the open_as method of RIo
  - Do not use R_XXX_NAME() macros anymore. simplify!
  - Add 'ah' command to select the handler
* Do not allow to seek on unreadable addresses
  - Warns a lot but its better. More strict
* SEEK_END is now UT64_MAX. Fear
2010-01-31 02:30:59 +01:00
pancake
d5138a7c1d * Huge refactoring for r_cons and r_line
- Reduce the use of global variables by packing all them in a struct
  - Redesign the autocompletion method for r_line
    - Not yet finished, but so much refactoring out there :)
  - Using the singleton format (r_xxx_instance)
  - APIs has been cleaned up
  - Some bugs fixed
  - Syntax fixes

--HG--
rename : libr/cons/print.c => libr/cons/filter.c
2010-01-30 14:02:53 +01:00
pancake
8f3e91b9bb * Split install-includes from install: libr/ mk target
* Rename some enums in r_cons (C_ -> Color_)
  - Export colors in vapi and swig
* Initial dummy work with r_cons_instance singleton
  - Added _new() and _free() methods for r_cons
  - Redefine RCons structure
* Added r_cons python example
2010-01-27 01:50:26 +01:00
pancake
368aeaf974 * Some work to standarize r_cmd (R_API and _new)
* Move empty strsub.c to util/
* r_flags depends on r_cons (yeah, it shouldnt..)
  - just for tmp fun
* Fix some methods and declarations in r_bp and r_core vapis

--HG--
rename : libr/cons/strsub.c => libr/util/strsub.c
2010-01-26 14:06:41 +01:00
pancake
54bdfb22bd * Uppsercase classnames (rCore -> RCore)
- Fixes ruby warnings
  - Follow java syntax conventions
  - Helped to identify and fix bugs in many vapis
  - Sync swig examples
  - Add test-r_core.rb (ruby test for RCore)
* Some work in r_cons, some refactoring and cleanup
  - scr.html is now working again
  - w32 cons support should work now
  - Rename r_cons_get_columns -> r_cons_get_size()
  - But it needs more work
* Typedef all r_range, r_parse and r_anal structs
  - Add missing r_lib.pc in configure.acr
* 'make' clean now removes the libr* in swig/${LANG}/
2010-01-26 01:28:33 +01:00
pancake
bd84d7dfa0 * Add missing r_io.deps 2010-01-25 18:09:06 +01:00
Nibble
e4dd1cae7f * Fix segfault in radare2 due to last r_bin changes
* Add r_bin_init to the r_bin API
2010-01-25 17:54:32 +01:00
pancake
7ce3232747 * Build all pkgconfig files (fixes valaswig stuff)
* Split some install targets
* Fix segfault in r_anal when not setting any handler
* Rename R_ASM_SYN -> R_ASM_SYNTAX cprefix
  - R_ASM_*_NULL -> R_ASM_*_NONE
* Added nonworking scr.html eval key in r_core/config
* Add install-ruby target for swig bindings
* Use @VERSION@ in libr.pc.acr
* Lot of fixes for valaswig integration
2010-01-25 11:54:25 +01:00
pancake
e5b6d1582b * Add 'install-vapi' target in libr/Makefile
* Fix linking of r_core (r_bin not found)
* Lot of fixes for valaswig. libr, r_io and r_debug
  are now usable from python/perl/ruby
  - Fix many .vapi files
  - Enhace the libr.pc
  - r_hash.deps must be removed
  - Depends on valaswig-head
2010-01-24 23:47:18 +01:00
Nibble
56247931d9 * r_bin
- More refactoring ;)
  - Added dummy r_bin_load & r_bin_free
2010-01-24 15:35:28 +01:00
Nibble
08d5afd5c5 * Fix configure-plugins sort function
* Now r_bin is only using r_buf/r_file for file handling
2010-01-24 12:40:48 +01:00
Nibble
1721bdfe79 * r_buf
- Added R_BUF_CUR for reading at current offset
* r_bin
  - r_bin_java rewritten using r_buf
  - Removed unnecessary headers
  - Some minor fixes in r_bin_pe and r_bin_elf
2010-01-23 13:42:44 +01:00
Nibble
157c727d89 * More work on r_bin_pe 2010-01-22 20:38:41 +01:00
Nibble
b3db31bb9e * r_bin
- Huge refactoring of r_bin_pe
 - Minor fixups in r_bin_mach0
2010-01-22 17:33:56 +01:00