Commit Graph

41 Commits

Author SHA1 Message Date
pancake
d6756e235c Implement author and version of RAsmPlugin 2017-02-28 02:26:55 +01:00
Damien Zammit
af0a865d9f WIP - Totally remove host endianness dependence
- Adds endian aware functions
- Removes references to host endian
- Uses binary detected endianness else tries LE and restricts by RAsmPlugin
- Fixes gdb debugger endianness when debugging BE qemu gdbserver

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-05-04 23:42:17 +10:00
pancake
deafc518b0 Refactor RAnal.ESIL (-800 LOC). Fix x86-64 32bit mov 2015-09-05 10:44:51 +02:00
Jonathan Neuschäfer
523aa3af5c add .version to all plugins 2015-07-12 19:05:33 +02:00
pancake
db9c22aade Fix memleak in core/anal 2014-09-14 04:24:03 +02:00
Jonathan Neuschäfer
1d337c6794 asm_bf: fix an out of bounds read and don't combine traps 2014-09-13 17:50:42 +02:00
pancake
63f00d0b0f Implement working ESIL backend for Brainfuck. Requires manual init 2014-09-13 02:24:50 +02:00
Jonathan Neuschäfer
3506fcbefe bf: remove a useless heap allocation 2014-09-13 00:47:58 +02:00
Jonathan Neuschäfer
c16588aa4a bf: clarify repetition counting 2014-09-13 00:47:58 +02:00
Jonathan Neuschäfer
c4a379ad51 bf: rename peek/poke to in/out 2014-09-13 00:47:58 +02:00
Jonathan Neuschäfer
29601c3b54 Fix display of repeated brainfuck instructions
An snprintf with the same source and destination buffer caused the buffer to
be read as an empty string.

To quote the Linux Manpages project:

  C99 and POSIX.1-2001 specify that the results are undefined if a call to
  sprintf(), snprintf(), vsprintf(), or vsnprintf() would  cause  copying  to
  take  place  between  objects that overlap (e.g., if the target string array
  and one of the supplied input arguments refer to the same buffer).
2014-09-13 00:47:58 +02:00
pancake
bc46258402 Show bits and enhace RAsm plugin descriptions 2014-02-25 17:03:12 +01:00
pancake
525d4a5865 Fix #637 - bf causes segfaults if blocksize is too big #637 2014-02-17 17:25:10 +01:00
pancake
230efd1f05 Rename {RAsmRAnal}Op inst_len and length to size 2013-12-06 05:04:17 +01:00
pancake
d49b56dc3a RAnalPlugin now have .license and uses the same .bits like in RAsm 2013-12-05 18:41:13 +01:00
pancake
7d70f79755 Fix #399 - Add .license to all plugins 2013-12-02 04:44:26 +01:00
pancake
722659005d Better brainfuck and arm64 support. Fix some bugs
- Fix infinite loop bug in dietline using quoted commands
- Update brainfuck disassembler and analyzer
- Fix #232 - r2 error on corkami's standard.elf (missing strtab)
- Honor 'other' color palete
- Fix bug in disasm.c filtering flag replacements
- Removed '#' prefix for numeric arguments in aarch64 disasembler
- Fix infinite loop in '">"' command
2013-09-30 01:14:04 +02:00
pancake
5285d1bdea Break ABI. r_asm_disassemble's length is now 'int' 2013-04-09 22:54:04 +02:00
pancake
5ad9ae97ed Fix some bugs (nullptr, memleak) reported by clang-analyzer 2012-09-26 10:01:43 +02:00
pancake
9bf02ca738 * Minor enhacement in asm.bf disassemble syntax 2011-10-09 05:27:22 +02:00
pancake
8de9123520 * Add make chlog target to genereate shlogs
* Fully implement the asm.bf assembler and disassembler
  - Syntax fixed. disassembled code can be reassembled
  - Added support for misd instructions (multiple instruction single data)
    rasm2 -a bf 'add [ptr], 8;trap,64;nop;poke;'
2011-10-09 05:24:15 +02:00
pancake
13d24051b7 * Implemented assembler support for asm.bf plugin
* Added support for breakpoints in the brainfuck debugger
  - Fixed write delegate in io.bfdbg plugin
  - asm.bf is now compiled as static in core
2011-10-09 04:41:53 +02:00
pancake
a43068bde0 * brainfuck debugger is finally usable
- Added breakpoint and code analysis plugins for bf
  - *mem++ != mem[0]++
  - Full register get/set support
  - Support for step and continue-until-syscall
  - Work in progress breakpoint support
* Added bfvm_reset() hooked to plugin->kill
* Enhacements in r_core and r_debug for better debugger support
  - Added plugin->step_over delegate
2011-10-09 04:15:32 +02:00
pancake
9efe88a9ce * Fix offbyone in asm.brainbuck bug
* Fix some segfaults and issues in r_magic
* Use the libr/socket/http library
* Added r_io_http plugin
* Magic search is extremely slow
2011-10-07 01:16:45 +02:00
pancake
535a2aa713 * r_asm_disassemble use _CONST_ut8* buffer now
* Split core/cmd.c into disasm.c and core/visual.c into vmenus.c
* Fix some warnings reported by valgrind
* Chop instructions disassembled by udis86
* Fix visual prompt display in debugger mode
* Added 'pdi' and 'pdf' commands
  - Used to print just instructions or lengths
  - Documented via 'pd?'
* Added initial work on a test suite for r2
  - Spot a crash!
2011-06-04 03:14:04 +02:00
pancake
8bef25d14d * Fix segfault in bin_java (still buggy and duppy)
* Change asm_bf license from gpl3 to lgpl
2011-04-27 16:51:41 +02:00
Nibble
ddffdff8d2 * Rename r_asm_aop_* to r_asm_op_*
* Rename remaining r_anal_aop_*
2011-02-24 16:50:29 +01: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
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
5c35f6e359 * Rename {r_*_handle_t, R*Handle} to {r_*_plugin_t, R*Plugin} 2010-05-26 01:42:22 +02:00
pancake
c8d637a26a * RAsmHandle -> RAsmHandler.. Same for RBin
- Define RAsmHandler in r_asm vapi
* Random code cleanup
* Define RHex.str2bin in rutil vapi
2010-05-26 00:59:10 +02:00
Nibble
97bc1e4b62 * rasm
- Add r_asm_code for massemble and mdisassemble
  - Use realloc in massemble and mdisassemble
  - Remove unused disasm_obj
2010-01-08 18:25:25 +01: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
Nibble
94445e1540 * Change the name of some types
- s/u64/ut64/
  - s/u32/ut32/
  - s/u16/ut16/
  - s/u8/ut8/
2009-07-08 13:49:55 +02:00
Nibble
724d900e62 * r_asm
- Fixed initialization
  - Fixed assembly fallbacks
  - Removed dupped memcpy's in disassembly functions
  - Added the directive ORG to asm_x86_nasm
  - Refactoring
* rabin2
  - Added -L to list supported plugins
2009-04-14 15:21:19 +02:00
pancake
cdd80105cb * Initial dummy implementation of r_bp
- Managing breakpoints for the core
  - Initial work on the support for breakpoints
    for the r_debug plugins
* Adding some dummy work for context support in r_anal
* Make asm_set_bits check per-plugin supported bit sizes
  - Now asm plugins have 'arch' and 'bits' attributes
  - Used to setup default callbacks for undefined 'assemble' callback
  - Also used to avoid setting asm.bits eval variable to invalid values
  - We need a way to display all this data
* Added DEFAULT_ARCH in config.h to setup default arch to asm and anal
* Added r_config_set_i_cb()
  - Make r_config_set restore value when callback is called and fails
  - asm.bits now has a config callback
* Added _LAST in some r_anal enums
2009-04-11 21:22:20 +00:00
Nibble
acc455109f * Several fixups 2009-03-10 12:21:46 +01:00
pancake
b2e785fc61 * Add 'static-plugin' feature to r_asm module
* Make rabin2 support 'arm' instead of 'asm_arm' for -a (autoprefix 'asm_')
* Some build fixtures
* Static plugins are configurable in libr/config.mk and libr/config.h
2009-03-08 23:49:15 +00:00
Nibble
ea44bb103a * r_anal
- Added initial anal_x86_bea plugin (op analysis using bea engine)
    'ao' command in radare2
  - Minor fixups
* r_asm
  - Modified r_asm_aop_t to fit r_anal requirements
  - Updated r_asm plugins
* r_parse
  - Removed several warnings from mreplace
  - Removed unnecessary includes
2009-02-26 15:15:19 +01:00
Nibble
2cc6fcd1e4 * r_asm
- Initial import of bea engine
  - asm_x86 splited in asm_x86, asm_olly and asm_bea
  - More refactoring
2009-02-18 22:10:47 +01:00
Nibble
777235bb87 * r_asm
- Added arm plugin
  - Added bf plugin
  - Added csr plugin
  - Added m68k plugin
  - Added mips plugin
  - Added ppc plugin
  - Added sparc plugin
  - Removed deprecated test programs
  - Updated rasm2 (not working)
* r_parse
  - Initial import

--HG--
rename : libr/asm/arch/arm/asm.c => libr/asm/p/asm_arm.c
rename : libr/asm/arch/bf/asm.c => libr/asm/p/asm_bf.c
rename : libr/asm/arch/csr/asm.c => libr/asm/p/asm_csr.c
rename : libr/asm/arch/m68k/asm.c => libr/asm/p/asm_m68k.c
rename : libr/asm/arch/mips/asm.c => libr/asm/p/asm_mips.c
rename : libr/asm/arch/ppc/asm.c => libr/asm/p/asm_ppc.c
rename : libr/asm/arch/sparc/asm.c => libr/asm/p/asm_sparc.c
rename : libr/asm/arch/x86/pseudo.c => libr/parse/pseudo.c
2009-02-18 03:47:40 +01:00