Commit Graph

884 Commits

Author SHA1 Message Date
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