16030 Commits

Author SHA1 Message Date
Fangrui Song
835d432b06 Misc fixes to io and search 2017-09-17 01:42:56 +02:00
pancake
c09e0f3748 Fix leak in cons_setattr 2017-09-17 01:41:27 +02:00
pancake
829009a339 Revert "fix leak in cons/canvas:set_attr by strdupping everything"
This reverts commit 00074b3a445973b1f2d0f83eb8ed96ef31f666b9.
2017-09-17 01:41:08 +02:00
Khairul Kasmiran
9523d39ad5 Add C[hsdmf]j cmd 2017-09-17 01:27:10 +02:00
Fangrui Song
5b16d507d4 Fix O(n) duplicated calculation of skyline in _section_reapply 2017-09-17 01:10:53 +02:00
Fangrui Song
b59cc9ff36 Fix /F file offset 2017-09-17 01:10:53 +02:00
Fangrui Song
f6cf0dab04 Fix search.in=io.maps : search in non-overlapping RIOMap parts not overriden by others of higher priorities (skyline) 2017-09-17 01:10:53 +02:00
Fangrui Song
27d525a1de Fix /j 2017-09-17 01:10:53 +02:00
Fangrui Song
c70ff9ab80 cmd_search.c: help 2017-09-17 01:10:53 +02:00
Fangrui Song
b2d5fac55c Fix search range of /x 2017-09-17 01:10:53 +02:00
Fangrui Song
2defeea47d Rename /f (search file) to /F and add /f (forward search) as per /b (backward search)
The search range will be the intersection of at most 3 intervals:

* search.in
* [search.from, search.to) if one of them is not UT64_MAX (default), which means the range is specified
* [core->offset, 2**64) if /f is used, [0, core->offset) if /b is used

Name the intersection `search_itv`

For each search boundary given by search.in, individual search is done in the intersection of it and search_itv
2017-09-17 01:10:53 +02:00
Fangrui Song
ac16dfdc8b Misc fixes to search
* fix /a tests, hoist r_search_kw_add
* fix /A tests
* respect search.{from,to} in append_bound
* fix /o out-of-bounds read
2017-09-17 01:10:53 +02:00
pancake
b75c14d48a Remove confusing "id" in /j 2017-09-17 00:32:00 +02:00
Fangrui Song
7ed1d509a6 Refix #8328, honor pd@x:9090 and px @ 0-1 (#8531) 2017-09-17 00:23:40 +02:00
pancake
6b82d4ad95 Revert "Fix #8328, allow @ 0-1 (temporarily setting core->offset to UT64_MAX) (#8507)"
This reverts commit 842e64f7434e993d4ef23533434481741aeb8349.
2017-09-16 02:41:48 +02:00
Fangrui Song
d9608fe186 Support powerpc64 PTRACE_GETREGS (#8529)
On BSD, addr and data are swapped. But on Linux, only SPARC strays.

Goodbye SPARC and Solaris.
2017-09-16 02:33:52 +02:00
Fangrui Song
deb7c07c63 Intrusive augmented top-down red-black tree 2017-09-15 19:36:57 +00:00
pancake
65b9c999a5 Fix crash in pI 1111111 2017-09-15 17:26:30 +02:00
Khairul Azhar Kasmiran
3668ed6b11 Show hidden metadata as "hidden" (#8525) 2017-09-15 17:13:15 +02:00
pancake
6da1fa47bf Fix crash in dd A, dd .,,.,,, and in V||| and V```... 2017-09-15 16:59:51 +02:00
pancake
cb137dfef3 Fix crash in =<5 2017-09-15 16:08:32 +02:00
pancake
206b592186 Fix rarun2 manpage to avoid arg number confusion 2017-09-15 16:02:22 +02:00
pancake
0fe4acb18c Fix invalid free in omn command 2017-09-15 16:00:15 +02:00
Xiangyu Zhu
d8817d782f fix pd for rip varsub of AT&T syntax (#8523) 2017-09-15 13:45:17 +02:00
Fangrui Song
bd285dedc6 Optimize space consumption to O(n) in edit distance (#8481) 2017-09-15 13:44:57 +02:00
pancake
ac63497b5a Remove harmless attach warning and support sparc in get/set-regs 2017-09-15 13:08:16 +02:00
pancake
dcec3c0e99 Fix dupped extern C issue 2017-09-15 13:11:22 +02:00
Fangrui Song
94ba8ea79a reg/profile.c: remove a duplicated FLG => GPR hack (#8516) 2017-09-15 11:32:29 +02:00
Fangrui Song
f13c943193 Fix #8168 Add io.cache.{read,write} (#8510) 2017-09-15 11:32:01 +02:00
Rene Laemmert
c0e036dcb0 Fix #8498 r command should resize the map (#8518)
* Fix #8498 r command should resize the map

* removed useless check
2017-09-15 11:25:38 +02:00
xarkes
c118091c42 Fix #8486 (meson missing bins) (#8519) 2017-09-15 10:17:50 +02:00
Rakholiya Jenish
00074b3a44 fix leak in cons/canvas:set_attr by strdupping everything
fix formatting
2017-09-15 14:32:07 +08:00
Fangrui Song
842e64f743 Fix #8328, allow @ 0-1 (temporarily setting core->offset to UT64_MAX) (#8507)
Rationale:
`s 0-1` is already allowed, so should `@ 0-1`
r_num_math returns 0 on error, testing addr with UT64_MAX does not make sense
appease condret
2017-09-14 12:50:48 +02:00
Fangrui Song
18ed9b6ebd Fix #8497 Opening unexistent file opens two files (#8508) 2017-09-14 12:42:20 +02:00
Fangrui Song
1c4407cb69 Fix #8388 - Replace RIOMap::{from,to} with RAddrInterval itv. 2017-09-14 12:40:22 +02:00
Lowly Worm
987a8080a7 json output of maps should be unsigned 2017-09-14 01:20:49 -07:00
xarkes
9a8250dbc8 Fix meson sdb generation 2017-09-14 09:20:25 +02:00
Maijin
1314905e81 Fix AVR detection for rjmp/nop 2017-09-13 23:26:47 +02:00
pancake
52ebe07f49 Fix #8502 - Crash in =< dt 2017-09-13 15:19:38 +02:00
Rene Laemmert
8f5f57a21b Fix #8335 printing correct offsets for all maps with on* 2017-09-13 13:45:50 +02:00
pancake
f266f6b740 Fix last covs - mainly null derefs and undefined vars 2017-09-13 12:13:20 +02:00
pancake
1434fbc5a5 Fix the uninitialized issues in graph.c 2017-09-13 11:55:15 +02:00
Fangrui Song
cdc09730f4 Fix mem leak in bin.c 2017-09-13 11:52:15 +02:00
Fangrui Song
813e415a1c Fix #8189 - refactor search.c (#8195)
* fix r_search_mybinparse_update when locating `a+a+b` in `a+a+a+b` where len(a) > 1, e.g. locating `ababc` in `abababc`
* fix /d (r_search_deltakey_update) with same issue
* fix search.distance
* fix binmask
* swap the order of the nested loop
* add RSearch::maxhits . More work later
* add RSearch::data for data used by matching algorithm

before:
  for (i = 0; i < len; i++)
    r_list_foreach (s->kws, iter, kw)

after:
  r_list_foreach (s->kws, iter, kw)
    for (i = 0; i < len; i++)

rationale:
  + searching for more than one needles is rare. the branches used in inner loop harms performance
  + it's cumbersome to bookkeep for each `kw` in advanced searching algorithms
2017-09-13 11:48:59 +02:00
pancake
98a5b8e44c Fix #8500 - Overflow when indenting too deep JSONs 2017-09-13 11:39:10 +02:00
pancake
9ff729cd61 Fix #8499 - Support $() blocks instead of backticks 2017-09-13 11:13:43 +02:00
Sajjad Pourali
0d8a4b16b2 fix an always true condition in fcn.c (#8496)
* fix a always true condition in fcn.c

fcn.c:1080:17: warning: address of array 's->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
                                if (s && s->name) {
                                      ~~ ~~~^~~~

* fix an always true condition in fcn.c
2017-09-13 10:52:55 +02:00
Fangrui Song
2772a8da5e cmd_debug.c: add command name beside case labels (#8494) 2017-09-13 10:33:59 +02:00
pancake
8315feb1d8 Bring back the levenstein and fix previous commit 2017-09-13 10:25:13 +02:00
pancake
24c85ac965 Bring back the levenstein diff and add missing function signatures 2017-09-13 10:16:19 +02:00