Commit graph

881 commits

Author SHA1 Message Date
Anton Kochkov
ef3e68619d Refactor to use API in visual and graph modes 2021-02-12 00:33:59 +08:00
Giovanni
639fe1170b
[java] Remove DsoJson (#585)
* removed java/main.c

* Removed DsoJson

* fixed access_flags introduced bug.

* Simplified convert_string

* refactoring code.

* fixed invalid json.
2021-02-11 15:31:21 +01:00
Khairul Azhar Kasmiran
bed58d01cb
aaef: Add help msg and x86_32 test (#568) 2021-02-10 21:58:09 +08:00
Riccardo Schirone
96ea7e5126
Mark gdbserver as BROKEN for now (#549) 2021-02-09 13:32:21 +01:00
Alexis Ehret
8945da4a86 Fix dead assignment test/unit/test_id_storage.c 2021-02-09 10:37:25 -01:00
Alexis Ehret
55e3d3ebed Fix dead assignment test/unit/test_cmd.c 2021-02-09 10:37:25 -01:00
Florian Märkl
6f4336dcc4
Rename RJson to RzJson (#545) 2021-02-08 19:02:32 +00:00
wargio
8cfa9e31e3 Support in newshell for <cmd>?*[j] and j*[j] <command> 2021-02-08 01:53:32 +01:00
yossizap
9ea2984174
Add gdbserver tests ##test (#502) 2021-02-06 12:09:53 +01:00
Florian Märkl
7408e30cba
Fix assert on base64 crypto final call without buf (#517) 2021-02-04 18:26:31 +08:00
Khairul Azhar Kasmiran
f22b290279
Windows subprocess: Remove \r only if followed by \n or not part of esc seq (#512) 2021-02-04 18:00:48 +08:00
Florian Märkl
ed6d93d4d2 Make rz_base64_encode use the right types 2021-02-03 15:40:29 -01:00
Anton Kochkov
48d34e1571 Add rz_config_* API for booleans 2021-02-03 22:32:08 +08:00
Riccardo Schirone
e7ebbb22ba
Create API for .ar*, .dr*, aei, ar <reg>=<val> (#511)
* Move rz_debug_reg_list from RzDebug to RzCore and directly use rz_cons_printf
* rz_reg_get_list returns always the same list, so make it const RzList *
2021-02-03 21:58:36 +08:00
pancake
8fee2899f4 Add tests for pf.write 2021-02-03 19:27:30 +08:00
Fangrui Song
fa9db31b8c rz-diff: drop MODE_DIST
MODE_DIST (-s) is the same as MODE_DIST_LENVENSHTEIN (-ss) but much slower.
Drop it. Make MODE_DIST_MYERS (-sss, faster than MODE_DIST_LENVENSHTEIN) take its place (-s).

The original comment was incorrect (-s is not Eugene W. Myer's algorithm). It is correct now.

Co-authored-by: eagleoflqj and Maskray
2021-02-03 19:27:30 +08:00
GustavoLCR
154f34f8f1 Delete register flags if necessary after aaft
* Fix tests
2021-02-03 08:23:24 -01:00
Florian Märkl
e76c435565
Add rz_strf() Macro (#506) 2021-02-02 19:17:44 +01:00
Florian Märkl
1907784363 Use portable Format for Graph Metrics in Zignatures 2021-02-02 09:11:09 -01:00
Daven Du
c023766f50
Add test for show current offset's function (#476) 2021-02-02 06:46:47 +08:00
Khairul Azhar Kasmiran
7ce7fa6acc
Add "initial view" test for Visual mode (#500)
* Add "initial view" test for Visual mode

* Put test under archos/linux-x64 for now

* Add same test under archos/windows-x64
2021-02-01 19:39:54 +08:00
Khairul Azhar Kasmiran
3a59a1b6cd
Reclassify some AVR instructions away from SWI (#495) 2021-01-30 21:56:11 +08:00
Khairul Azhar Kasmiran
37d24d7f71
Fix -Wformat-truncation warnings (#493)
* Fix -Wformat-truncation warnings

* Don't evaluate macro parameters multiple times
2021-01-30 12:15:34 +08:00
Riccardo Schirone
c4906a2b68 Fix unit test tree 2021-01-28 11:57:28 +01:00
Riccardo Schirone
cee8d470c2 Remove Makefiles and many related scripts 2021-01-28 11:57:28 +01:00
Florian Märkl
4ef3ed08f3
Fix gcc 9.2.0 kind of x86_64 jumptables (#475) 2021-01-28 08:24:40 +01:00
GustavoLCR
216233a76a
Fix io.va being set to true after aaft (#459) 2021-01-27 17:22:10 +08:00
GustavoLCR
0c7fd087cb Fixes for jump table ##analysis
* Try to detect shift of first case value
* Detect when block where switch table is attached is split by analysis
* Fix attaching switch table to wrong block
* Add/fix tests
2021-01-27 09:43:13 +08:00
Riccardo Schirone
28a59224b9
Consider parentheses args as $.args (#450)
In this way things such as:

(10 + 3)

Are interpreted as regular $.args, composed of:
- `(` as (arg_identifier)
- `10` as (arg (arg_identifier))
- `+` as (arg (arg_identifier))
- `3` as (arg (arg_identifier))
- `)` as (arg_identifier)
2021-01-25 18:35:37 +00:00
Paul I
3313b6fd24
RzTable: replace UT64MAX with dashes for X specifier 2021-01-22 19:37:41 +08:00
Liumeo
ff76c71984 Use pj in core ##refactor (#18267)
* Use pj in core ##refactor

* fix tests
2021-01-22 18:01:58 +08:00
Anton Kochkov
a0be4e2e64 Run clang-format 2021-01-21 22:05:44 +08:00
Anton Kochkov
ff03079463 Remove unnecessary code style test 2021-01-21 22:05:44 +08:00
eagleoflqj
e22b403744 Use pj in cmd_print ##refactor 2021-01-21 18:04:03 +08:00
Francesco Tamagni
8c09d0bd30 Fix Mach-O rebase on fat slices ##bin (#18248)
* Don’t add boffset to macho sections paddr
* Add test
2021-01-21 18:04:03 +08:00
Giovanni
8d4b4552db
Patching AVR ao wrong output on rjmp instruction (#415)
* Patching AVR ao wrong output on rjmp instruction
* Fixed test output
* Add AVR RJMP test

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2021-01-21 17:36:56 +08:00
Riccardo Schirone
dfb9de8e70 Implement seek autocompletion 2021-01-21 11:15:13 +08:00
Riccardo Schirone
4eae6a0686 Add rz_cmd_desc_get_arg API 2021-01-21 11:15:13 +08:00
Riccardo Schirone
144ba639dc
Convert s commands to newshell (#375)
* Rename `sj`/`s*` and move them under `sH`. Remove `s=`
* Rename `s-*` to `sH-`
* Use `sd` for "seek delta", which moves relative to the current offset
* Enforce <cmd> <arg> syntax. So no more `s+16` but `s +16`. Command
  `sHr` is for redo history, `sHu` for undo history. If one wants to move
  relative to the current address, they need to do `sd +10`/`sd -10`.
* Remove `ss` commands in favour of `cmd.seek.silent`. This was anyway
  used mainly for scripts, so no need to replicate all `s` commands
  under `ss`.

Change a bit rz_core_seek API to avoid dupped entries in seek history.
2021-01-20 10:30:20 +08:00
Briand Djoko
a2b394d3fd
Add additional ELF header fields to rz-bin output (#372) 2021-01-19 08:51:49 +01:00
yossizap
79ee0dcd24 Added windows rebase tests ##test 2021-01-19 09:38:16 +08:00
yossizap
80b5700e8f Fix dbg.dts test ##test 2021-01-19 09:38:16 +08:00
Khairul Azhar Kasmiran
d5601cc2fe
Replace naked rz_sys_system/write/read/freopen calls with their wrapped counterparts (#388) 2021-01-19 00:07:19 +08:00
Khairul Azhar Kasmiran
ea73a9c2fa
Clear syscall and sysregs sdbs if their files are not found (#379)
* Clear syscall and sysregs sdbs if their files are not found
* "Fix" cmd_k tests

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2021-01-18 17:09:47 +08:00
yossizap
3212a6cf10
Merge pull request #376 from yossizap/fix-reg-trace-crash
Fix trace crash caused by a mismatch between the register profile and op analysis
2021-01-18 16:59:12 +08:00
Khairul Azhar Kasmiran
acc087b1e5
Unbreak "avr stop analysis when invalid instruction" test (#377) 2021-01-17 19:59:17 +08:00
Giovanni
e4cdedcb30
AVR: Fixed profile, (null) instruction and analysis (#361)
* Fixed missing SN alias in AVR profile.

* Fixed "(null)" instruction and analysis when unknown type is found.

* Added tests for AVR regarding (null) and invalid analysis

* AVR test is broken, due random behavior on clang.
2021-01-17 00:36:29 +08:00
Riccardo Schirone
8a37385bbf
Fix ??? command, which should show the help of ? (#365)
* Fix `???` command, which should show the help of `?`

Due to recent changes it was not working anymore, because it was
interpreteing `???` as the help with detail=3 of the root node. This
patch limits the number of detail to 2 (which is what is already assumed
in another parts of the code anyway), so that `???` can be interpreted
as the help with detail=2 of `?`. For now this makes it work, however
there needs to be some review of the whole `?` subtree.

* Add test for ???

* Fix ??? test spaces

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-01-16 23:54:40 +08:00
Anton Kochkov
d3c1788d21 Mark rz-asm -k test as broken 2021-01-16 14:13:18 +01:00
eagleoflqj
c6a3cde851 Use pj in rz-hash ##refactor 2021-01-16 14:13:18 +01:00