Commit Graph

56 Commits

Author SHA1 Message Date
pancake
1ea43bbc10 * Commit initial vala plugin in swig/vapi/t/plugin.vala
- Many fixes in r_core, r_lib, r_cmd and r_anal
  - Needs patched vala head with #618933
    https://bugzilla.gnome.org/show_bug.cgi?id=618933
* Fix RCmd plugin handlers user data pointer
2010-05-18 00:20:24 +02:00
Nibble
8ff37cd30b * r_anal
- Add r_anal_strmask
  - Add nopcode (opcode count) to RAnalAop
* r_util
  - Fix constant types in r_types_base
* Add r_anal stuff to TODO
2010-05-16 14:04:08 +02:00
pancake
c552863cef * Initial refactoring work for 'pd' and 'pD' commands
- Colorize bytes and offset when scr.color=true
  - Still needs to be moved to r_print
  - Needs cleanup, optimization and simplification
2010-04-14 22:28:45 +02:00
pancake
7a753ac0cb * strnlen helper in format/elf/elf.c is now static inline
* Some random syntax cleanups
* Fixes some warnings in r_socket on w32
2010-04-14 13:28:56 +02:00
pancake
96bf343a4b * Added doodle results in main TODO file
* Added r_flags.vapi in r2-swig
  - Add example usage
  - Add missing r_core.deps
    - There are some bugs there while accessing inner fields of RCore :/
2010-04-09 17:13:35 +02:00
pancake
373a3db8b7 * Implement r_lang_setup for python
- Setups RCore, int or string types
* Added r_core_cast() static method
  - Helper for swig magic
  - Allows to cast C pointers into python instances
* Fix EOF issue in #!<lang>
* Fix and sync r2-swig vapis
2010-04-09 15:57:22 +02:00
pancake
d468580c3c * Fix one-byte overflow in r_cons_memcat
* Fix flagSort command (fS)
  - sort by name is now done by strcmp
  - str_hash and str_hash64 are not enought
* Use r_cons in flag/t .. we must drop this dependency
* Add 'all-flagspaces' entry in Vt menu
  - When switching back to visual mode, the
    print mode is not lost
* Some code cleanup
2010-04-09 13:24:40 +02:00
pancake
b860a73afd * Initial working implementation of the signatures
- Support raw search
  - Allow to check for each analyzed function
    .zc@@fcn
  - Added 'zc' and 'zp' commands
  - Remove 'az' commands
2010-04-08 15:48:53 +02:00
pancake
68cb13b0a6 * Do not ask to save project when project file is ""
* Clean and refactor of the TODO
2010-04-07 11:07:59 +02:00
pancake
c2bc7e0377 * Initial split of r_search_keyword
* Fix -soname of osx linker (-install_name)
* Added OSX build instructions in doc/osx
2010-04-05 22:49:22 +02:00
pancake
49edd0649c * Implement 'wc' command to list, commit and reset cache changes
- Added doc/iocache with a usage session of 'wc' command
  - Needs io.cache=true
  - This is the replacement of the 'undo' feature of radare1
  - Removed cache-related code from the r_vm module
2010-03-30 23:12:19 +02:00
pancake
cc732d3ee7 * Release and bump version 0.4
* Use posix shell for libr/rpathstrip.sh
2010-03-25 23:57:15 +01:00
pancake
9fcdcce2a7 * Some sorting of TODOs
* Disable asm.x86.nasm assembly on non-intel syntax
* rpathstrip after install (should fix debian issue)
2010-03-25 21:14:28 +01:00
pancake
ea5413f760 * Added csr code analysis plugin
- Cleaned up version from r1 code
  - Build asm.csr and anal.csr by default
* Added 'dsu' command. step until
* Remove vala and swig checks in configure.acr

--HG--
rename : libr/asm/arch/csr/csr_disasm/dis.c => libr/asm/arch/csr/dis.c
rename : libr/asm/arch/csr/csr_disasm/dis.h => libr/asm/arch/csr/dis.h
2010-03-23 12:30:04 +01:00
pancake
1521ccf621 * Initial VAPI for RAnal 2010-03-19 12:23:14 +01:00
pancake
d6125712b5 * Add some missing methods in some vapis for valaswig
* Merge r_macro inside r_cmd
  - Rename RCommand to RCmd
* Propagate LIL_ENDIAN in userconf.h.acr
* Simplify configure script in swig/
  - valaswig is now mandatory
* Add 'st.fastcall' examples.

--HG--
rename : libr/macro/macro.c => libr/cmd/macro.c
2010-03-18 22:22:21 +01:00
pancake
3da650d4b1 * Write and install manpages
* Merge r_trace into r_debug (RDebugTrace)
  - Implement 'dt' command to manage debugging traces
  - TODO: Track register values and memory changes
  - Added dbg.trace and dbg.trace.tag
* Added r_sys_now() to retrieve ut64 value of current time
  - Must check endianness issues
* Initial work trying to implement RPATH support to ELF
* Less flat command tree
  - 'dt' is now 'dbt'
  - 'dk' is now 'dpk'
* Some more random syntax cleanup fixes
* Say 'yes/no' instead of 'ok/fail' in check-langs script
2010-03-12 18:46:11 +01:00
pancake
f00bf9495e * Implement basic thread list and attach support
- Implement 'dt' command
  - Allows to list threads of specified pid or current one
    - Only for linux atm
  - Tricky non-intrusive way to get threads for pid
* libr/th/t/test.c is now helpful for debugging threads
* Threads are not stopped when the debugger breaks
2010-03-11 00:29:36 +01:00
pancake
1341620c73 * Rename cons/filter.c to grep.c
- Some random changes.. with no success
  - Grepping console buffer is not working
* Cleanup the 'ds' and 'dp' commands
  - Implement 'dpa' to attach
  - Allow to list childrens of pid
  - Also list all attachable pids
* Fix segfault by leaking.. needs some cleanup
* Fix r_debug_reg_list (NULL) issue

--HG--
rename : libr/cons/filter.c => libr/cons/grep.c
2010-03-08 00:18:58 +01:00
pancake
fcbcc00d1e * Huge refactoring on r_syscall
- Integrated with core 'as' command. as? for help
  - Display formatted parametters of syscalls
  - Needs to fully implement this everywhere
  - Syscall argument parsing is not yet complete (<4args)
    - r_debug_arg_{set|get}
* Implement continue until syscall on Linux debugger backend
* Lot of syntax cleanup to use the new code convention
  - Clean r_sign, r_search, r_syscall
* Define global R_SYS_ARCH, _OS and _BITS
  - Handle asm.os and asm.arch to hook r_syscall plugins
  - Display 8 or 16 zeros depending on asm.bits
  - Added r_str_filter () to filter nonprintable chars

--HG--
rename : libr/search/stripstr.c => libr/search/strings.c
2010-03-04 01:46:25 +01:00
pancake
9c0636e5ca * Fix return value of bin_meta_elf
* Added 'dsl' command to step until next meta information
  line is reached.
* Display file:line with context 5 with 'CL' command
  - Fix r_file_slurp_line
* Added 'dcu' command to continue until an address
  - bp,dc,bp-
* Added dbg.swstep to configure stepping debugger algorithm
* Add file.type. fixes warning. Defined by rabin2
* Load rabin2 in va format when debug or va modes are enabled
* Ask to kill the child before quitting
* cmd_quit is no longer calling 'exit'.
  - Returns R_CORE_CMD_EXIT (-2)
  - Return value can be captured at core->num.value
* Implement native kill as a debugger callback
* cmd.visual is now cmd.vprompt
* Add r_debug_reg_{get|set}
  - Handle register name aliases
  - Works only with ut64 type
* 'dr:eax' is now 'dr?eax'
* Lot of random syntax cleanups
2010-02-28 22:58:21 +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
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
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
5e3f145019 * Fix libr.a libr.so linkage
* Minor sort of TODO files
* Nicer output for make install
* Add socket/t/Makefile and fix test case
2010-01-18 22:14:19 +01:00
pancake
3bc0212ee6 * Initial import of the 'configure-plugins' script
- accepts --static and --shared to setup which plugins
    you want to build statically in the library or dynamically
  - normalize .mk and plugin file names to adopt a single standard
  - WARNING: huge commit
* Added 'mk/sloc.mk' with 'sloc' target to count
  lines with sloccount everywhere (yeah!)

--HG--
rename : libr/asm/p/x86bea.mk => libr/asm/p/x86_bea.mk
rename : libr/asm/p/x86nasm.mk => libr/asm/p/x86_nasm.mk
rename : libr/asm/p/x86olly.mk => libr/asm/p/x86_olly.mk
rename : libr/config.h => libr/config.h.head
rename : libr/config.mk => libr/config.mk.head
rename : libr/debug/p/dbg_gdb.c => libr/debug/p/debug_gdb.c
rename : libr/debug/p/dbg_ptrace.c => libr/debug/p/debug_ptrace.c
rename : libr/debug/p/dbg_libgdbwrap/Makefile => libr/debug/p/libgdbwrap/Makefile
rename : libr/debug/p/dbg_libgdbwrap/README => libr/debug/p/libgdbwrap/README
rename : libr/debug/p/dbg_libgdbwrap/client.c => libr/debug/p/libgdbwrap/client.c
rename : libr/debug/p/dbg_libgdbwrap/gdbwrapper.c => libr/debug/p/libgdbwrap/gdbwrapper.c
rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-internals.h => libr/debug/p/libgdbwrap/include/gdbwrapper-internals.h
rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-stddef.h => libr/debug/p/libgdbwrap/include/gdbwrapper-stddef.h
rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper.h => libr/debug/p/libgdbwrap/include/gdbwrapper.h
rename : libr/debug/p/dbg_libgdbwrap/include/libaspect.h => libr/debug/p/libgdbwrap/include/libaspect.h
rename : libr/debug/p/dbg_libgdbwrap/include/libe2dbg.h => libr/debug/p/libgdbwrap/include/libe2dbg.h
rename : libr/debug/p/dbg_libgdbwrap/include/revm.h => libr/debug/p/libgdbwrap/include/revm.h
rename : libr/debug/p/dbg_libgdbwrap/interface.c => libr/debug/p/libgdbwrap/interface.c
rename : libr/io/p/dbg.mk => libr/io/p/debug.mk
rename : libr/io/p/io_dbg.c => libr/io/p/io_debug.c
2010-01-13 23:42:49 +01:00
pancake
78dbab76d6 * Added basic working example in swig-python for r_util
* Add _write and _puts methods for r_socket api
  - fgets -> gets
  - fix r_socket_printf
* More random fixes
* typedef all structures in r_util
2009-12-22 13:27:43 +01:00
pancake/fluendo
1ac990a330 * Fix build 2009-11-23 17:49:40 +01:00
pancake
deb263a5fb * Apply whats's patch fixing r_search for stripstr
- Thanks! :)
* Added dummy r_socket_proc_* api
  - Needs to be moved outside r_socket
  - Added two non-working usage examples
* Add some checks and enhacements to the r_buf API
  - Implemented in r_util.vapi
* R_APIfy the r_cache api
* Add missing methods in r_socket.vapi
* Update the README file in r_anal describing the
  new design of r_anal..not yet finished
2009-10-12 17:41:52 +02: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
35c078584c * Fix build of r_debug
* Some random warning fixups
* extern plugins defined in handle.c for asm, bin, .. cleaner
* RAPIfy the r_bininfo
* Initial implementation of Rarray Iterator
  - Needs some tuning in core Vala..but it is ok for demos
  - r_bin API is now using the Rarray iterator
  - Added Vala test program for it
* Fix build of some test programs
* Added r_diff and r_bininfo VAPI files
  - The APIs are inconsistent and untested. Proposals welcome
  - Fix possible overflow in r_bininfo
* Initial implementation of pool.c
  - Implements Memory.Pool class (Extracted from 'alt')
  - Added test program
2009-09-22 13:27:33 +02:00
pancake
fdf164e229 * Add 'r_io_undo'
* Added deinitializators for r_io_cache
2009-09-08 18:16:52 +00:00
pancake
16cf12c8d6 * Fixtures for the r_io API (breaking ABI and so :)
- Standalone test program is now able to debug a process and read mapped memory
  - Fixes in the r_io and ptrace plugin sides
* Added 'make vdoc' target
2009-09-07 20:01:34 +00:00
pancake
1ee0247b94 * Fix build of core
* Fix non-static plugins build in r_debug and r_io
* Fix debug_ptrace - working with example but not in r2
* debug/t/main.c is now working correctly
* Massive R_APIfication in r_io and r_util
* Added r_io_read_i to read from memory as a ut64 in any endian
  - read4.c example uses this new function
* Fix build of r_io static plugins
* Some more checks at random places in r_io (more stable)
  - r_io_set_fd() simplifies fd and plugin setup
* Added |pid command for ptrace io plugin
* Added io->printf to avoid use of forced 'printf'
* Add more lib_types names. fixes probable segfault
* Added hg-ci hg-utils makefile target
2009-08-22 04:54:41 +00:00
pancake
bc1b1b976e * Initial implementation of r_asm_fastcall()
- VAPI sync
  - Used to get register N to call fastcalls (syscalls f.ex)
* Code analysis marked as 8-bit compliant
2009-08-14 00:37:18 +00:00
pancake
1c3a319c53 * Added 'pkgcfg' directory with autogenerated .pc files
- 'make pkgcfg' does that automagically :)
* Implement r_mem_mem function in r_util
2009-07-16 00:30:20 +00:00
pancake
0509263cbd * Initial import of r_db 2009-06-15 02:44:05 +00:00
pancake
ff8a7ecd58 * cleanup the TODO file
* Added cfg.debug config variable
* Fix the basic stuff for r.dbg.reg api integrated with core
* Failover into the plugin breakpoint implementation to support
  non memory breakpoints like API ones or hardware ones
* Added initial non-working version of the gdbwrap debug plugin
  - We need to design an IO plugin for gdbwrap too (or a way to
  change the IO based on the debug plugin)
2009-04-17 11:42:45 +00:00
pancake
5f74c8068d * Move buf_hex memcpy in r_asm instead of dupped code in every plugin
- Plugins needs to be synced
* Added x86nasm assembler backend to handle x86-64
  - Not yet working. Pretty buggy :)
* Fix support of building static plugins for r_bp
  - Statically link r_bp_x86 by default
* Implement ugly r_sys_cmd_str() command in r_util
2009-04-13 22:47:02 +00:00
pancake
1129f1a2fc * Remove documentation in the uninstall target
* Add 'autogen.sh' to ease the use of 'acr'
  - Added USERCC and USEROSTYPE configuration flags
    --with-compiler : select a compiler from mk/
    --with-ostype   : select a target OS (not required for ming32 f.ex)
* Add language bindings APIs from radare1
  - Fix some issues from the ruby language binding
  - Checks if file exists before slurping and causing a ruby segfault
  - Added language destructor (.fini pointer)
* Rename str_clean into r_str_chop
* Initial work on the port for ming-w32
* Show flags instead of bytes in disassembly (smart disasm)
* New r_sys_{get|set}env (for portability issues
* Added flags -i and -l to radare2
* Fix warnings and random code cleanup
* Added r_flag_get_i
2009-04-03 11:11:17 +00:00
pancake
0b7ed2a6f0 * Fix segfault when using '&&'. Lost allocated pointer
* Fix some valgrind warnings
  - The debugger+visual is now working more stable
* Comment 'strip -s' command in stripsyms.sh
  - We need a better way to configure all this stuff (spp?)
2009-04-02 00:07:58 +00:00
pancake
70186e1120 * More R_API-zation
* More stuff in doc/release
* Added 'dk' for sending signals to processes in the debugger
  - A bit hacky, but funny enought for testing
* Initial draft of the process-related API
  - For handling tree's of processes with threads
* Fix a bug in dietline ('supr' key is working now
2009-04-01 22:44:43 +00:00
pancake
0a84b63927 * Fix build (use gcc)
- Fix issues in r_bininfo (now the test program works)
  - Properly add the static r_bininfo plugin
2009-03-23 13:22:23 +00:00
pancake
99f284f358 * Some work for r_bininfo library
- Extend API to get file and line numbers from a virtual address
  - Added addr2line-like test program 'rabini'
  - Added 'addr2line' plugin
* Add r_file_slurp_line helper in r_util
* Added initial work to support multiple compilers (gcc only atm)
  - tcc support under development
  - Make HAVE_REGEXP be optional
2009-03-22 04:37:46 +00:00
pancake
448d76a5e7 * Fix lot of bugs with cons+grep for @@=`` or stuff like that
* The grepping algorithm in r_cons has been rewritten from scratch
  - Grepped at memcat() which is the root entrypoint for console IO
  - Faster than before (200 less LOC)
  - Not yet working at all, but it is quite better than before
* Fix history bug when using @@
* Use return value of filtercmd function to not invoke children core_cmd
* Fix some random segfaults
2009-03-21 22:59:35 +00:00
pancake
c673ede6b7 * Bug identified in cons with r_core_cmd_str identified
- We have to grep stuff when inserting it, not when flushing
* Fix 'pd' command (initialize base address
* Initial import of the foreach @@ syntax sugar
  - Basic flag support, allows @@= for lists and @@.() for macros
* Add 'g' and 'G' keys in visual
* Fix issues in the macro engine and usage
  - Proper identification of dupped commands
  - Split macro name and arguments in internal structures
  - Chop last ')' to make () and (,) macros work happily
* Fix build of r_sign and a segfault in _free() method
2009-03-20 21:05:12 +00:00
pancake
1d90ad7143 * Add constructor/destructor for r_anal and r_sign
- Add rasign test program for r_sign
* Minor code cleanup in cons
* Cleanup and sort commands in help message
* Make oobi input work as command interpreter
  - Add r_core_cmd_buffer
* Some basic design workup for xrefs search engine
2009-03-14 11:39:37 +00:00
pancake
d1c0b4620d * Initial implementation of 'sa' command
- Accepts a 2nd blocksize argument
  - Fix algorithm used in r_core_seek_align to work with 'sa'
* Fix issue with 's+' and 's +' expressions
* Clean up some warnings + minor bugs
2009-03-12 22:19:58 +00:00