70 Commits

Author SHA1 Message Date
jvoisin
050d383ae7 Improve a bit the help for anal-related commands (#6348)
* Improve a bit the help for anal-related commands
* Help for `dcs`
* Help for wt
* Add help for dcu
2016-12-21 09:02:55 +01:00
Maijin
ffd8ecd14b Add remaining [?] 2016-11-26 14:57:21 +01:00
Álvaro Felipe Melchor
87724384d1 added r_cons_break_{push/pop} to handle ^C better
Besides an UAF has been fixed afecting only ELF
2016-11-21 16:56:12 +01:00
Chris Rorvick
9b47635f0c remove `next' param from r_core_block_read()
This was originally used to cause a seek to the next block prior to
reading such that successive calls to r_core_block_read() would progress
through memory one block at a time.  This was broken, though, by commit
452669d94113 ("more cleanup in r_core_block_read") when when it used
`next' to directly calculate the offset rather than via a seek.

Only one call site remains that attempts to read the next block instead
of the current, and this probably was not even observable due to the
"hacky fix" added in commit 3bfa61946eca ("Cleaner pvj, fix tinype load,
and honor 'ao N's").

The current of semantics of `next' appear to be broken and there is very
little dependence on it.  If the original behavior should be restored
anywhere, it would be much better to add a new function, or just do the
seek explicitly, rather than parameterizing r_core_block_read() on it.
2016-08-15 14:26:58 -05:00
Chris Rorvick
97cea63435 fix backwards seek
Commit 57b199789d6a ("Reread block after undo seek. Fixes dbg.status
issue") reads the *next* block into the buffer rather than the current.
This breaks backwards seeking as can be seen in the following example:

  $ r2 -N malloc://0x4000
  [0x00000000]> b 64
  [0x00000000]> wb 38
  [0x00000000]> s 64
  [0x00000040]> wb deadbeef
  [0x00000040]> s-32
  [0x00000020]> px
  - offset -   0 1  2 3  4 5  6 7  8 9  A B  C D  E F  0123456789ABCDEF
  0x00000020  dead beef dead beef dead beef dead beef  ................
  0x00000030  dead beef dead beef dead beef dead beef  ................
  0x00000040  0000 0000 0000 0000 0000 0000 0000 0000  ................
  0x00000050  0000 0000 0000 0000 0000 0000 0000 0000  ................
  [0x00000020]> s+16
  [0x00000030]> px
  - offset -   0 1  2 3  4 5  6 7  8 9  A B  C D  E F  0123456789ABCDEF
  0x00000030  3838 3838 3838 3838 3838 3838 3838 3838  8888888888888888
  0x00000040  dead beef dead beef dead beef dead beef  ................
  0x00000050  dead beef dead beef dead beef dead beef  ................
  0x00000060  dead beef dead beef dead beef dead beef  ................

The first block to a string of ASCII '8' bytes and the second to
0xdeadbeef.  We then seek backwards 32 bytes from our current 64 byte
offset but a dump at the resulting offset shows data from half way into
the second block (i.e., offset 0x60.)  Dumping again after seeking 16
bytes forward shows the expected last bit of the first block.  Clearly
the intent was to reread the current block, not the next block, after an
undo or backward seek.

NOTE: The above example will only work after applying the previous
commit as rereading the buffer when displaying the prompt hides this
bug.

Additionally, since the commit intended to reread the buffer only after
an undo seek, do not do this at all on a backward seek.
2016-08-15 14:00:39 -05:00
Anton Kochkov
68ef35f635 Uniform name RUndos -> RIOUndos (for bindings) 2016-06-02 07:34:06 +03:00
Rene Laemmert
2740e74e49 added cursor to undo seek history (#5054)
* added cursor to undo seek history

* cleanup the mentioned parts
2016-06-01 12:16:00 +02:00
Álvaro Felipe Melchor
fb52d91d95 fix oob in seek line 2016-05-23 22:07:32 +02:00
Riccardo Schirone
8727840e90 anal/fcn: use getter/setter to access the size of a RAnalFunction
This is one of the first steps to improve analysis. This way we'll have
one single place to change if we want to change the meaning of the
"size" field. (size -> realsize)
2016-05-19 01:50:50 +02:00
pancake
47b861b975 Update seek command help 2016-05-09 10:58:06 +02:00
pancake
7676272b18 Add sj and s= commands 2016-05-09 10:39:19 +02:00
Jeffrey Crowell
9518841434 refactor includes (#4757) 2016-05-03 04:52:41 +02:00
Jeffrey Crowell
b14de33807 fixup seek to local flags a bit better.
ref: #4615
2016-04-15 16:20:09 -04:00
pancake
6d3370d115 Implement local flag seek in r_core_num_callback 2016-04-12 01:32:11 +02:00
pancake
0274089288 Fix #4615 - seek to local flags '+.', and handle f.flag=addr 2016-04-12 00:55:03 +02:00
zlowram
a494a59901 Get current section baddr if multiple files are open 2016-01-03 03:12:33 +01:00
zlowram
abc5575dfc Fixes for #3899 and #3902
- If lines.from is 0, sl 1 seeks to baddr
- Added sll command to show total number of lines and removed the other
messages
2016-01-03 03:11:16 +01:00
zlowram
c916d1ca18 Fixed bug in r_core_lines_initcache 2015-12-29 11:38:04 +01:00
zlowram
db8fbcc68b Added config variable to set absolute or relative lines 2015-12-28 16:44:26 +01:00
zlowram
91611e8cbb Implemented slc subcommand and slc? help. prl now uses lines cache if
available.
2015-12-24 13:18:09 +01:00
pancake
6de6f35b30 Fixes for sl and lines.* eval vars 2015-12-22 02:33:09 +01:00
zlowram
b371b9a4f7 Implemented 'sl' command
- Fixed tabs indentation
 - Using r_num_math instead of atoi
 - Fixed warning and used R_SNEW0 instead of calloc
2015-12-22 02:32:33 +01:00
Álvaro Felipe Melchor
8d9af55342 Fix #3628 2015-11-09 15:30:13 +01:00
pancake
5c99eb0c3f Uppercase register aliases 2015-10-31 01:59:01 +01:00
pancake
b515a34676 More stdboolification 2015-09-14 12:35:38 +02:00
Jeffrey Crowell
5858c2846b fix #2753
please send chair-IT.txt to crowell@bu.edu
2015-06-13 19:30:40 -04:00
pancake
7bda81d6d0 Add /A and s/A to search for opcodes of specific type.
-Add OP.Type.FPU and OP.Type.PRIV (wip)
2015-03-04 00:46:59 +01:00
pancake
f307e4b6bb Handle s/v s/c s/V and fix help message 2015-03-03 22:34:44 +01:00
jvoisin
1facea2766 Fix two minor warnings 2015-02-03 15:53:51 +01:00
Jeffrey Crowell
bdc1ec0a06 remove unneeded blocksize var 2015-02-02 22:24:56 -05:00
Jeffrey Crowell
197f194ca1 make so -x seek to previous instruction
closes #2005
2015-02-02 22:23:27 -05:00
pancake
b04d0f257a Fix #2005 - Fix so -1 2015-01-29 02:49:04 +01:00
pancake
1be6be0a75 Spawn cmd.xterm in visual with '@' key. Enhace remote consoles 2014-10-07 00:56:39 +02:00
condret
4f70c1bf89 kill RCoreFile->size 2014-09-30 15:31:19 +02:00
Jody Frankowski
df289d8611 Unify fcn_find and get_fcn_at in get_fcn_in and get_fcn_at 2014-09-26 17:16:28 +02:00
pancake
cfc8383f4a Fix #1340 - 's <mathop>' 2014-09-13 18:15:11 +02:00
pancake
57b199789d Reread block after undo seek. Fixes dbg.status issue 2014-07-02 02:53:50 +02:00
Jody Frankowski
2831e8fc86 Colorize s 2014-06-23 12:06:35 +02:00
pancake
160c4568f7 More RPN ESIL (udis86, vm, conditionals, ..). Honor cfg.debug
- A debugger session can be turned into emulation with 'e cfg.debug=0'
- Fixed undo seek issues
- Fix "Unknown register 'rip'" issue
- debugger commands mixed with analysis ones. We must merge at some point
- More udis86 instructions translated to the new esil
2014-06-17 10:23:11 +02:00
pancake
5e33a8a282 Initial huge refactoring of r_io still work in progress 2014-05-28 04:34:12 +02:00
deeso
f6d2c77a97 reverted string padding in cmd_seek 2014-05-21 21:31:18 -05:00
deeso
5cb05ae967 Fixing address format in cmd_seek 2014-05-21 15:45:38 -05:00
Andrew McDonnell
37bd25aa5a Added ability to seek to address of arbitrary named function 2014-05-18 22:19:15 +04:00
pancake
b4d10aa2db Fix #753 - Fix crash in sC (null deref coz invalid sdb key name) 2014-04-02 18:07:47 +02:00
pancake
609122eac9 Update to sdb 0.9 (array api changes) 2014-03-26 04:16:03 +01:00
pancake
fb98bc1335 More sdbization for comments and hints (-250LOC) 2014-03-12 02:44:49 +01:00
pancake
c43188c755 Some random cleanups for help pfx 2014-01-23 09:44:47 +01:00
pancake
0cce4f19fb Refactor to fix bindings 2014-01-23 04:34:59 +01:00
pancake
0776c81feb Refactoring in RAnal->Meta for -8LOC 2014-01-23 03:28:25 +01:00
jvoisin
9d3a6fb1fd Close https://github.com/radare/radare2/issues/467 2013-12-20 00:23:05 +01:00