46 Commits

Author SHA1 Message Date
Andrew D'Addesio
2243da3095 Fix comma logic in dmj (#9773)
Can't rely on iter->n since we are iterating over multiple lists.
2018-03-28 12:22:59 +08:00
Andrew D'Addesio
405c67d770 dm/dmm code cleanup and fix dmj json output (#9769)
* Always escape filename/path when printing json. (Fixes dmj output
  on Windows.)
* Always wrap path in quotes when printing r2 commands (even on
  non-Windows).
* Assume memory pages belonging to modules always have map->path and
  map->name set (i.e. remove redundant NULL comparisons).
* Assume memory pages _in general_ do not (per commit a1e24700e3c90182).
* In dm command, compare flag name against r_name_filter(map->name).
* Fix dm output for user maps.
2018-03-27 16:32:39 +02:00
pancake
a1e24700e3 Fixes for winedbg:// and debug.io 2017-11-04 15:37:09 +01:00
pancake
b8a4dcdf34 Tweak dm output to make seek+hud happy 2017-10-16 16:05:38 +02:00
pancake
94b2fc64d2 Implement RIODescData and adjust RIOMach to work with it
- Handles a magic to ensure the destination struct is the expected one
- Based on r_str_hash, but it must be cached
- Use more r_io_desc_get_pid ()
2017-09-11 01:24:13 +02:00
alvarofe
2e462ec8f0 Bring RIODesc from SIOL and cleanup 2017-08-18 01:31:57 +00:00
pancake
8f6de80193 Fix #7619 - Make dm consistent with dmm 2017-07-10 01:02:21 +02:00
pancake
326f81e91d Enhance dm= to avoid huge gaps in the ascii art lines 2017-03-18 23:13:35 +01:00
Álvaro Felipe Melchor
6870bec29f Fix #6853 - get rid of asserts 2017-03-12 15:24:05 +01:00
pancake
2a5afa18e8 Fix dm= colors 2016-11-06 00:43:28 +01:00
pancake
cea2c80d56 Show flags in dm, add dmq and add resolver in rnum 2016-10-16 02:34:54 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
nevun
20801a3ee4 Make dm work on OpenBSD by adding a native r_debug_native_map_alloc() (#5267)
Note that OpenBSD can have mappings with zero size so relax the assert.

Also note that the protection bits are flipped. Different bit order. Will fix that later.
2016-07-02 13:22:28 +02:00
pancake
608b79d2b4 Finally fix the build on osx-ppc 2016-06-06 17:30:07 +02:00
pancake
34a7837079 Include r_lib from r_bp 2016-04-13 14:48:17 +02:00
pancake
1b5cd887ce Disobey rabin2 -B if bin is not pie, enhace dmm* and mach0 2015-10-19 02:41:21 +02:00
jvoisin
420a5c41e0 Fix some minor compilation warnings 2015-10-15 12:36:34 +02:00
Álvaro Felipe Melchor
c1f023ae5a Fix #3172 2015-10-14 00:11:35 +02:00
jvoisin
4261075d60 Misc fixes to make clang-analyser even more happy 2015-08-29 18:08:38 +02:00
Álvaro Felipe Melchor
d8b1ee5b9b More cleanup in debug 2015-08-26 00:47:15 +02:00
pancake
7c3ef24314 Delegate dmm logic into the native plugin.
- Add native iOS/OSX support to list modules
- Generic fallback used for the rest of platforms
- Update sdb to fix ~{}
- Fix ARM64 analysis typo issue
2015-08-24 01:29:35 +02:00
shuall
0807686d86 #3052 all printf member functions changed to cb_printf 2015-08-09 03:25:05 +02:00
Anton Kochkov
4d58edede2 Prevent segfaults 2015-04-11 02:41:02 +03:00
pancake
274bdce6c9 Enhace r-num-units() and show size of dm maps 2015-02-23 10:39:56 +01:00
pancake
0cb78f973e Fix #2004 - filter flag names in dm* 2015-01-29 02:25:00 +01:00
pancake
857e635f49 Use PFMT64u instead of PFMT64d to display addresses 2014-10-23 12:35:08 +02:00
pancake
b3fbb4383a Fix map boundaries check 2014-05-31 16:23:05 +02:00
fr33tux
a68171d3e9 Remove r_list_unlink and r_list_unref functions 2014-05-03 01:27:10 +02:00
fr33tux
3d801f90ff Remove r_list_destroy, replaced it by r_list_purge 2014-05-03 01:27:10 +02:00
pancake
f664821d8e Fix loading the RBin information of PIE bins when debugging 2013-12-17 02:10:13 +01:00
pancake
b3c57e53aa Add 'exit' alias for 'q'. Implement JSON output for 'dm' 2013-10-06 15:04:19 +02:00
Eduardo de la Arada
7187adb5e8 Add alloc/dealloc memory
* Allow memory alloc and dealloc on debug (APPLE ONLY)
2013-07-21 03:05:56 +02:00
pancake
0d993c8cbd Initial working code injection with r_debug_execute() 2013-04-16 04:01:39 +02:00
pancake
be6c39c54f * Use r_list_foreach[_safe] where appropriate. 2012-02-14 18:19:16 +01:00
pancake
42edc834d2 * Added maps for debug.bfdbg
- Implement dm* command
* Implement hex:// handler in io.malloc plugin
  - r2 hex://1020304090102030
2011-10-09 19:45:34 +02:00
pancake
5292c61a48 * Handle syscall name/number resolution in 'asl' and 'dcs' commands
- Thanks @pof for noticing! :D
2011-07-21 19:17:15 +02:00
pancake
17189725d2 * Fix other use-after-free bugs related to r_list_unlink
- Use r_list_delete instead of r_list_unlink in various places
    - Some operations are now a bit faster
2011-04-29 13:55:27 +02:00
pancake
dacab5e4bf * Initial implementation of r_debug_step_soft and _hard
- arm-darwin seems to not support stepping, mips follows
  - Delegate swstep responsability to r_debug api
* Implement set registers in arm-darwin
  - write in memory is not yet working
* Some fixes in memory regions list in arm-darwin
2010-11-11 03:13:44 +01:00
pancake
182b7737cf * Remove deprecated documentation
* Some syntax fixes
* Some changes in the design of the vars in r_anal
* Remove 'CF' command and META_FUNCTION type
* Fix 'S' '*' mark when in debugger
2010-07-02 02:01:51 +02:00
pancake
c73e43bf40 * Fix print_address function for mips disassembler
* Implement 'gp' register index inside .got section for get_main on mips
* Use more switch() in core/cmd.c
* Simplify some random code
2010-06-27 21:33:11 +02:00
pancake
d564c5a0fe * Implement 'dcc' and 'dcr' debugger commands
- Using continue-until-opcode-type call
  - Implemented continue-until-syscall in the same way
* Fix r_str_hash() algorithm to avoid colisions
* Added r_sys_bt()
2010-05-24 12:07:54 +02:00
pancake
34435b1285 * Mental note: %lld/%llx does not exist on windows
- Use the macro PFMT64{xod} in case
2010-04-14 13:02:23 +02:00
Nibble
30a31d3970 * r_util
- Fix memory leak in r_list_free
  - Update test in list.c
* r_bin
  - Add dummy function for elf section resize
2010-03-08 19:40:21 +01:00
pancake
a74926c6d0 * Integrate backtrace into the debugging backend
* Add 'dcs' command to continue until syscall
  - Need syscall analysis
* Some tips for future enhacements in r_search
2010-03-02 11:18:49 +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