Commit Graph

141 Commits

Author SHA1 Message Date
pancake
f8fcba5d81 * Implement plugin support to r_cmd
- Added dummy command **dummy** for testing purposes
  - Initialize CMD dynamic plugins from r_core
* Fix bug in configure-plugins
  - Generates bad config.mk and config.h when no static
    plugins defined for a category.
2010-02-26 00:37:49 +01:00
pancake
020686b86f * Implement r_str_argv()
- Use it from p/debug
  - Now is possible to debug programs with arguments
  - Added test program in util/t/argv
* Fix pd/pD
* Clean and fix the native debugger plugin
* More random code syntax cleanup
* Rename io plugin names without the deprecated 'io_' prefix
* Fix mk/stat-make.pl (missing ;)
2010-02-23 00:26:13 +01:00
Nibble
a536777d35 * Add support for ARM to r_bin_mach0
* Update r_core using r_bin_meta_*
2010-02-22 20:10:52 +01:00
pancake/imac
0efc6402ec * Fix disassembler (was depending on unitialized variable)
* Lock r_config instance
  - Add cmd.* eval vars
2010-02-22 04:25:35 +01:00
pancake/imac
edb48945b7 * Added DEFAULT_ARCH for mips and powerpc
* Refactoring in r_anal API for _aop() with addr and length
  - Added ppc code analysis plugin
  - sync in r_core
* cfg.ffio->io.ffio
* Add CMD type in r_lib
* Added SR register type
* More stuff is now working in osx-ppc debugger
* Random code cleanup
2010-02-22 04:02:13 +01:00
pancake/imac
dfd884db74 * Initial steps to make osx-ppc debugger work
- Use 'asm.arch=ppc' in POWERPC by default
  - Added r_io_mach for MACH microkernel debugging
    - Compiled as static plugin by default
  - Added darwin mach/ptrace stuff in debug_native
  - Very ugly code.. needs some refactoring
  - Add powerpc-OSX registers description map
  - Added temporally .h files in debug/p/native
* Display verboser version message with 'r2 -V'
* More linking issues fixed for OSX
* Build gdbwrap debugger plugin
  - Not yet usable
* Added R_SYS_OS R_SYS_ARCH and R_SYS_ENDIAN strings
* Deprecate DEBUGGER variable
2010-02-22 02:42:29 +01:00
pancake
14f9fe8b65 * Autodetection of --with-ostype in configure.acr
- Rebuild configure script in ACR 0.8.1
* Random minor changes
2010-02-21 20:24:28 +01:00
pancake/imac
9890c6e8b0 * Fix build in OSX
- env.sh now also uses DYLD_LIBRARY_PATH
  - Fixes in ollyasm/dis to link with no global variables
    - Remove double definition of global _state
    - Same for asm_java
  - Split -shared and -Wl,-R into LDFLAGS_{LIB|LINKPATH}
    - Fixes linkage in osx
  - anal_x86_bea plugin now links correctly against BeaEgine.o
  - dietline is now #include'd from line.c
  - no debugger support yet
  - Do not externalize any variable. Some linkage does not support it
* Remove bininfo dependency .. aims to be merged into bin soon
* Added r_str_case() method to change to lower/upper case a string
2010-02-21 20:21:36 +01:00
Nibble
8d4172972d * r_bin
- Add field bits to RBinInfo
  - Make r_bin_*_get_arch compatible with r_asm
* rabin2
  - List sections before anything else
  - Add "e asm.bits x" to "rabin2 -ir" output
* r_flags
  - Remove r_flag_set_base
* r_io, r_core
  - Now r_io handles all the va related stuff
  - Execute rabin2 with the flag -v if io.va = true
2010-02-21 11:35:49 +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
pancake
e110ce46da * Oops. reapply revision 383 2010-02-12 03:17:32 +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
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
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
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
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
pancake
8fbe0be140 * Add --without-pic configure flag to build radare2
without PIC code (only static libraries, and link binaries)
  - Fix linking order dependencies
* Fix some missing EXT_EXE
* Add some definitions to make debug_ptrace register work
  on Solaris and *BSD (no windows yet)
  - Some fixes for mips, x86, x86-64, arm and powerpc
* Initial import of rsc2
  - Added intel2att rsc2 sample script
2010-01-21 21:22:30 +01:00
pancake
56678feaed * Initial working implementation of software breakpoints
- Many API rethink for the r_bp/r_reg/r_debug bizarre triangle love
  - Support for recoil for software breakpoints
  - Some debugging printfs.. next step, hardware and mmu breakpoints
* r_bp_restore is now used correctly from r_debug
  - sw bps are written when returning to proces and erased when back to dbg
* Fix build of bp plugins on w32/osx
* Add support to 'repeat' commands from r_core
  - 3ds ; same as 'ds&&ds&&ds' ; perform 3 steps
* Fix a memory leak in rBreakpointItem constructor
* Fix some possible segfaults in r_debug
* Fix double definition cause segfault in r_reg for r_reg_types array
* Fix rLibrary/r_lib typedef class name (fixes valaswig compilation)
2010-01-21 02:38:52 +01:00
pancake
41ba5c0104 * Add some missing ${EXT_EXE} in t/
* Implement write register support in debug.ptrace
  - Added many new commands related to registers to r_core
  - Allow to set register values
  - List register types
  - Display register values by type
  - Get value (f cureip @ `dr:eip`)
  - Added continue with signal method to r_debug API
  - drp : display register profiles
  - drp [file] : load register profile
  - Fixes in r_reg, r_io vapi and test program
2010-01-19 11:25:17 +01:00
pancake
2a054f6bba * Added w32dist makefile target to generate a distributable zip
with .dll and .exe for w32
* Do not build libr.${LIB_AR} by default (problematic in some platforms)
* Lot of more fixes for building on w32 - Yeah i got the first build done!
  - Check radare.org/get/radare2-w32*
  - So many things are still broken for windows
  - Fixes some recursive and missing dependencies
  - LINK and LDFLAGS must be after $OBJ
2010-01-15 17:02:04 +01:00
pancake
eb99dd1203 * Many more fixes for the mingw32 port 2010-01-15 13:02:54 +01:00
pancake
c326db2e77 * Integration with valaswig for many libraries
- typedef function pointers in r_search (rSearchCallback)
  - hide R_API stuff as it should in many .h files
  - typedef classes in rCore, rSearch
* Add perl, ruby, python examples for r_asm and r_bp
  - Many other libraries are compiled by default
* Adapt r_asm vapi to the current C api (massemble returns rAsmCode)
  - dynamically allocatable string buffer
* Rename seek->offset to avoid collisions
2010-01-12 02:12:18 +01:00
pancake
253892950d * Fix signature of r_cons_user_fgets
- ^D is now working in radare2 core_prompt ()
  - echo x | radare2 /bin/ls # is still broken
* Random code cleanup, rapification
2010-01-09 02:05:04 +01:00
Nibble
b1b7a981c4 * Minor fixups in rasm
* Update r_core to use r_asm_massemble
2010-01-08 21:23:54 +01:00
Nibble
1788030aa1 * Add missing include in core/cmd.c 2010-01-07 23:05:45 +01:00
pancake
eb0793c2b1 * Huge code cleanup and refactor for valaswig
- Some APIs has changed (r_hash)
  - Vapis have been reviewed
  - And more
2010-01-04 01:25:52 +01:00
pancake
ab190b6430 * Apply whats patch refactoring r_core_cmd and _subst
- Enables oneliners to run like
    > px 10 ; px | grep 7f; px > /tmp/a;
2009-12-31 01:27:03 +01:00
pancake
6c8c09b97a * Handle arrow keys in visual (thx whats) 2009-12-31 01:20:08 +01:00
pancake
f2305ffe22 * Fix syntax issue related to the last patch
- never define variables in the middle of a function
2009-12-30 11:05:11 +01:00
pancake
d8b5a660df * Apply patch from whats implementing '.!'
- Change spaces to tabs
  - Initial implementation of r_sys_cmd_str_full
    - support stderr slurping
2009-12-30 11:03:18 +01:00
pancake
692f5bbb54 * Fix segfault in quit command (thanks whats)
* Minor fix in r_bp vapi
2009-12-30 10:56:41 +01:00
pancake/fluendo
1ac990a330 * Fix build 2009-11-23 17:49:40 +01:00
pancake
8579a5b41f * Release version to 0.3
- Propagate @VERSION@ from ACR
  - All *2 apps are now supporting a -V flag to show the version
* Fix .dr* command in r_core debugger
  - dr now supports [regtype] [bitsize] arguments
  - Check dr? for help
* Added some 8, 16 bit registers to the dbg.ptrace backend
  - Just for testing :)
* Check build of the whole source tree
  - test programs are now in ${prefix}/bin/libr-test
* Fix lot of warnings and bugs
* Simplify some code
* Some rapification
* Fix segfault in r_reg related to unallocated arenas
  - New function r_reg_type_by_name() resolves string->id
* Fix help of rax2
2009-09-25 04:04:51 +02:00
pancake
648189f21f * Drop PFX in debug plugin names
* Minor cosmetic fixups
* Handle binmask==NULL in all _add methods of r_search
  - Added empty declarations of reset() and kw_reset()
* Various random fixes in some vapis
2009-09-24 19:46:32 +02:00
pancake
9442317413 * Major refactoring patch
- Remove plugin prefixes
    - It was unnecessary complicated
  - Remove unused code
  - Some RAPIfication
  - Rename _set( methods into _use(
  - Simplify some string processing
  - r_parse is working again
  - Sync all those api changes in r_core
  - External static plugin lists moved to .c
  - Fix some cast-related segfaults in core
* Review the r_search API
  - RAPIfication
  - Allow to pass NULL as binmask
  - Added TODO with some more ideas
2009-09-24 12:29:05 +02:00
pancake
42688da6ec * Rename some handle_set into _use() new syntax
* Make radare2 debugger interact with r_reg
  - Register profile is now provided by the r_debug plugin
  - |reg and dr works fine now
  - Fix reg_sync and reg_read for dbg_ptrace
* Clean some warnings
* Fix build
2009-09-20 02:16:14 +02:00
pancake
cfbb6574f7 * Initial implementation of the r_lang VAPI
- Added test program in Vala
* Added r_lang_define and r_lang_undef
  - They are global on the module
  - Each plugin should use lang_t
  - *user must be deprecated
2009-09-20 01:03:57 +02:00
pancake
a371f53a0f * Fix build of r_debug/r_core (little api changes)
* Initial import of the new design or r_reg
  - Needs to be implemented at all, but the big
    picture is here :)
2009-09-18 20:11:42 +02:00
pancake
91ad40d663 * Major unfinished refactoring for r_debug and r_bp
- radare2 debugger is now broken
  - r_reg has grown a bit more
  - Better separation of debugger elements
* r_bp now has r_bp_add_hw and r_bp_add_sw() calls
  - Added minimal support for breakpoint handlers
  - Import th0rpe's watchpoint expression parser engine
* iob moved from r_debug to r_bp
* Arch types has been moved into r_asm
  - Soft compile time dependency
* Update pkg-config .pc files
2009-09-14 00:37:28 +02:00