Commit graph

55 commits

Author SHA1 Message Date
Florian Märkl
14215350af Refactor RAnal Basic Blocks and Functions (#15169) ##anal
Basic Blocks are now global instead of owned by a single function.
2020-01-15 15:23:34 +01:00
David CARLIER
0626013ac7 Linux debug plugin, page promotion feature ##debug
* Linux debug plugin, page promotion feature proposal.

Providing new 'dmL' debugger sub command.
This is the only system having THP feature, others are more into
 direct huge tlb equivalent ...
The system ought to be set in madvise mode and disabled on Android,
would not do any good in this environment if this is ever supported.
Once the syscall succeed, the address range ought to get the
 little 'hg' VmFlags.

* interface changes
2019-08-03 06:09:07 -07:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
MK
61680079a7 Code refactoring the theme based colorization to reduce derefs ##cons 2019-04-16 15:56:41 +02:00
MK
95f4be5ae7 dm= now honors theme (eco) settings + wx sections are highlighted ##cons 2019-03-24 23:46:33 +01:00
lzutao
50320592a6 Fix #12060 and #12072 - Rewrite r_num_abs and r_num_units ##core
r_num_abs:

- Make r_num_abs static inline
- Use unsigned long long type when defining TB macro
- Use st64 instead of long long

r_num_units:

- Add len argument for buf in r_num_units
- Add PB and EB for r_num_units
- Always display one number after decimal point

  * This change simplifies the code
- Use long double type as assigning from ut64 to double cause data loss

r_num_tail_base:

- Use isxdigit (fast) instead of isHexDigit (slower)
- Rename nth to get_nth_nibble

Update all functions to use with new r_num_units:

- Remove side effect when using in other functions like cb_printf

* Trim trailing .0 when input is power of 2
2018-11-14 23:35:44 +01:00
radare
40cf3e4674 Use dashes in dm output instead of hash sign. (#11076) 2018-08-14 11:51:13 +08:00
Aaron
0d7774a657 Make dm. output like dm and add dmq. (#10354)
* Changed dm. to output rows like dm
* Made dm. output like dm and added dmq.
2018-06-15 11:10:43 +02:00
pancake
a3b024d869 Fix oobread with asan in dm 2018-04-16 09:51:18 +02:00
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 a1e24700e3).
* 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