Commit graph

31 commits

Author SHA1 Message Date
billow
4b385978a1
Convert ag to rzshell (#2916)
* `BROKEN=1` for `ag[df]`

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2022-08-22 08:16:14 +08:00
billow
0908b65bc3
Convert px[ dDhHwWqQol] to rzshell
* `pxd` -> `pxd 4`
* `pxd<N> [len]` -> `pxd <N> [len]`
* expose APIs:
- `rz_core_print_cmp`
- `rz_core_print_dump`
- `rz_core_print_hexdump_`
- `rz_core_print_hexdump_byline`
* test for `pxW` `pxH`
* move `void rz_print_section` -> `const char *rz_print_section`
* `pxd` -> `pxd[ hwq]`
* `pxc`
* `pxAv` -> `pxAl`
* `pxt.` -> removed ?
* `px/` -> keep
* `pxf` -> TODO: not found old code ?
2022-08-04 09:11:22 +08:00
billow
40ca22202b
Refactor rz_core_print_disasm_json (#2746)
* Split `rz_core_print_disasm_json` as: `rz_core_print_disasm_json` and `rz_core_disasm`
* Use `rz_str_enc_string_as_type` in `ds_init`
* Refactor `rz_core_print_disasm` and `rz_core_handle_backwards_disasm`
* Add `rz_core_asm_bb_middle`
* Move global `disasm_texts` to `RzDisasmState`
* Rewrite `core_analysis_bytes_standard` with `rz_core_analysis_bytes`
* Add `test_rz_core_print_disasm` and `test_rz_core_analysis_bytes`
* Rewrite `rz_core_print_disasm` with `RzCmdStateOutput`
* `pdi` -> `pdq` in tests
* `pdi` -> `pDq` in tests
* `pid` -> `pdq` in tests
* `pId` -> `pDq` in tests
* `pij` -> `pdj` in tests
* `pIj` -> `pDj` in tests
* `pdeqq` -> `pdeQ` in tests
* Remove `pDJ` from `test/db/json/`
2022-07-09 08:10:06 +08:00
billow
e767046197
Convert dL to rzshell (becomes dl) and expose API
- Convert `dL` to rzshell
- `dL` becomes `dl`
- Expose `rz_core_debug_backtraces()` API
- Expose `rz_core_analysis_hint_set_offset()` API
2022-05-13 20:17:56 +08:00
Giovanni
0d4d8f5892
Ported aa* commands under newshell (#2594) 2022-05-10 19:07:20 +02:00
Paul I
df354a4cec
Convert af commands to rzshell (#2586) 2022-05-05 18:19:17 +08:00
Anton Kochkov
c42dd5d4bb
Convert as commands to the rzshell (#2323) 2022-05-03 18:06:18 +08:00
Paul I
5ea3630c35
Convert ab commands to rzshell (#2395) 2022-04-02 21:27:55 +08:00
Peiwei Hu
79454cdbe2
Convert a8, aO and ao command to rzshell (#2396) 2022-03-21 16:58:54 +08:00
Riccardo Schirone
2c02457109
Convert o commands to rzshell (#2281) 2022-02-07 18:23:31 +01:00
Riccardo Schirone
6c2ee73fe7
Convert 'ob' commands to rzshell (#2201)
* Use API instead of 'oba' command in rizin.c
* Fix tests and use API instead of 'ob' commands
2022-01-14 08:45:16 +00:00
Riccardo Schirone
afc635f6d1
Convert om commands to rzshell (#2192)
* removal of `omo` command
* use of `oml`, `oml.` and `oml=` to list maps instead of `om`
* removal of RIZIN output from `oml`
* removal of `omn.` and just assume `omn` uses core->offset
2022-01-11 17:29:20 +01:00
Florian Märkl
3c2e4bf63a
Rewrite ar and dr with newshell (#2006)
* Show group-level details of commands

Details can be defined at either a group command or its subcommand of
the same name. If define on group-level it will also be shown in the
group help without needing ??.

* Fix > $ redirection for errored command and leak

* Rewrite ar and dr commands with newshell

Breaking changes:
ar* => arf, ar- => arf-, ar. => ar*
ar, => art, ar? => arq
ar0 => ara0, arb => arab, ars => araS
arC => arpC
arn => arR
art => arT
arf => arF
Removed: drm, aer
2021-12-06 19:02:43 +01:00
Dhruv Maroo
afd1bab3c0
Port db commands to newshell (#1777)
* Add `db` commands in `cmd_debug.yaml`

* Use bool instead of int as return value

* Port `db` commands to newshell

* Fix integration tests. Use `db- <addr>`, instead of `db-<addr>`

* Fix `dbW` handler and update `rz_w32_add_winmsg_breakpoint`

* Remove checks for `argc` in `cmd_debug.c` (from review)

* Fix failing Windows tests

* Change control flow in conditional expressions

* Use `RzCmdStateOutput` in handler for `dbt` to print backtrace in various formats

* Use forward slash (/) instead of pipe (|) for command descriptions

* Use output modes for printing breakpoints in `db` handler

* Remove extra newline while printing breakpoints in JSON format

* Change description for `dbc` command

* Update descriptions and handlers; Remove <addr> argument wherever necessary

* Use `RZ_CMD_ARG_TYPE_CHOICES` for perm in `dbw`

* Add details for `dbC` and `dbw`

* Add quiet printing mode for breakpoints

* Remove unnecessary <addr> argument for `db` commands

 * Also add a quiet output mode for `dbl` and `dbt`

* Return if no breakpoint found in function `add_breakpoint`

* Update tests for new `db` commands

* Update `db` command descriptions

 * Remove `dbi.` redundant command
 * Add details for iterating through the list of breakpoints

* Extract `rz_debug_bp_add_noreturn_func` into `debug.c` as RZ_API

* Fix `dbil` handler and `dbg_bps` test

* Shift the noreturn function breakpoint to `cdebug.c`

* Format according to clang-format

* Fix failing integration tests

 * TODO: Find why `db- @@c:dblq` is failing, and fix the bug

* Update `db` commands

* Use `db- @@c:dblq` instead of `db-*`

 * This will also work as a test for command edits (see https://github.com/rizinorg/rizin/pull/1806)
2021-10-08 21:40:51 +05:30
Paul I
15409562c9
Port ax commands to newshell (#1655)
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2021-09-23 22:05:57 +00:00
Pulak Malhotra
6fabb6d16a
Refactor dm commands ##refactor 2021-06-17 22:47:10 +08:00
Riccardo Schirone
f34e5c00f5 commands: rename sH to sh 2021-02-20 18:22:17 +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
eagleoflqj
e22b403744 Use pj in cmd_print ##refactor 2021-01-21 18:04:03 +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
liumeo
59a4792d43 Use pj in dmj, dmhj & fix regex ##refactor 2021-01-11 17:54:24 +08:00
eagleoflqj
4a19d719e2 Use pj in cmd_analysis.c ##refactor 2021-01-06 04:10:36 -06:00
eagleoflqj
b39a4220eb Delegate abj to afbij 2021-01-05 05:21:41 -06:00
Liumeo
e16221a477 Use pj in cbin.c ##refactor (#18143) 2021-01-05 05:21:41 -06:00
Lazula
b204be97ea Add om.j command (json output for io maps) (#18005) ##io 2020-12-10 12:43:28 +08:00
Aswin C
ed034c3a51 Add help for aij and arj ##anal (#17973)
* Add internal help for `aij` and `arj`

Add internal help for `aij` and `arj` under `ai?` and `ar?` respectively. Also updated test/db/json.

* Add help for `pda?` and `pds?`

Added help for `pdaj` under `pda` and `psdf`, `pdsb` under `pds`. Also added `pi` and `pI` under `p?`

* Add help for `@v`

Add help for `@v` under `@v?`
2020-12-07 23:18:29 -06:00
Aswin C
d4da3a1ea2 Use PJ in oij ##json (#17642)
* Use PJ in `oj`
* Replace `r_cons_printf()` and other minor fixes
* Fix output and add a basic test for `oij`
* Use `pj_kb` in writable and raised
* Move `pj_new()` and `pj_a()` outside the loop
* Fix \`oij\` by creating a new PJ array before the case begins, add the objects, and print and free it at the end of the function.

Co-authored-by: Liumeo <liumeo@pku.edu.cn>
2020-12-04 10:14:30 +01:00
Aswin C
d2f0419362 Use PJ in bj and add tests ##json (#17916)
* Use PJ in `bj` and add tests ##json
* Add `bj` to test/db/json
2020-11-24 14:51:44 +01:00
Vasilij Schneidermann
fe1ae6da04 Add JSON variants of pxd[1,2,4,8] commands (#17744) 2020-10-10 11:59:53 +08:00
Aswin C
61a1e15af5
Fix rj and add tests (#17682) 2020-09-21 16:17:33 +02:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00