Commit graph

27 commits

Author SHA1 Message Date
Khairul Azhar Kasmiran
652591f826
..(: Declare macro args as raw (#4453) 2024-04-21 12:16:30 +08:00
Khairul Azhar Kasmiran
688c2bbe7c
.(: Don't unescape macro args (#4450) 2024-04-21 09:58:38 +08:00
Khairul Azhar Kasmiran
36ce78bc38
.(: Don't unwrap quoted args (#4417) 2024-04-15 18:32:12 +08:00
Khairul Azhar Kasmiran
754538fd8a
Fix unescaping of \\ esc seq (#4402) 2024-03-31 11:48:15 +08:00
wargio
ef5d22e13d Fix string search related tests 2024-02-19 19:39:00 +08:00
billow
450cc81ae5
Move afv to afvl, add more modes (#3941)
* Add detail to `afv`
* Move `afv` to `afvl`
* Add TABLE mode to` afvlt`
* Add SHORT mode to `afvl`
* Add LONG mode for `afvll`
* Add test for `afvlt`
2023-10-29 14:07:12 +08:00
billow
d0732c5c88 Update tests 2023-06-05 22:41:20 +08:00
Giovanni
15c35ce974
Convert ps to newshell (#3451) 2023-04-06 08:43:04 +08:00
brightprogrammer
16e722cffc
Replace rz_core_cmd0 calls in tui/panels.c and port cmd_help commands to RzShell as cmd_math (#3421) 2023-03-30 18:36:48 +08:00
Florian Märkl
d9950f7479
Replace bp/sp-vars by generic stack-based ones (#3167)
Variables on the stack are not identified by bp/sp+<offset> anymore, but
by their address from the bottom of the stack frame (RzStackAddr),
independent of how they are accessed.
So now there are only two kinds of variables: stack and register.

This required some major refactoring and other changes:
* RzAnalysisVar.isarg was removed. Whether a variable is an argument is
  now specified implicitly by its storage location.
* Varsub of struct fields had to be rewritten so fields can be queried
  by arbitrary stack addresses using the recently introduced sp
  tracking, as the old approach to fill a list with all fields would not
  work anymore.
* analysis.vars.stackname was removed, new behavior is more similar to
  this being true before.
* Variables will not be created at stack+0 now, because the return
  address is there. Before, vars were only created sometimes in such
  cases.
* Variables created from bp offsets in x86 are not deleted anymore if
  the function's bp_frame is false (see removed
  rz_analysis_function_delete_vars_by_kind(fcn,
  RZ_ANALYSIS_VAR_KIND_BPV); calls). This may lead to some
  false-positive detected variables. Whether this really is a practical
  issue is yet to be seen. At least there are no meaningful tests that
  are broken by this.
* Applying variables from dwarf needed some fixes for determining the
  correct stack locations of variables in order to write meaningful
  tests. The handling is still not entirely correct for all
  possibilities of dwarf info, but at least the changed/added test cases
  are right and serve as a reference for future changes.
* Projects version 11 is introduced.
* afvb commands have been removed, afvs now handles all stack vars.
2023-01-02 11:36:21 +08:00
GustavoLCR
a6bd48f98b
Fixes for tests (#2818)
* Close files before trying to delete them
* Add `-N` to not load the rizinrc in `read from stdin` test to avoid overwriting the color setting
* Make sure `.tmp` exists for `idpx` test
2022-07-19 18:09:33 +08:00
Riccardo Schirone
36decf9438 RzCore: move wd function to rz_core_write_duplicate_at API 2022-05-25 14:03:17 +02:00
Riccardo Schirone
d20b026ce2
Finish conversion of w commands to rzshell (#2412)
* Convert 'wz' to rzshell
* Remove 'wt' commands in favour of > operator
* Convert 'ww' command to rzshell
* Convert 'wm' command to rzshell
* Convert 'wd' command to rzshell
* Convert 'wu' command to rzshell
* Convert 'wo' commands to rzshell
* Fix 'w' tests
2022-03-16 11:20:29 +00:00
Riccardo Schirone
dffc891ff8 Fix tests still using '...' syntax 2022-02-16 16:25:37 +01:00
Riccardo Schirone
dea0918afd
Convert wa commands to rzshell (#2293) 2022-02-09 18:49:11 +08:00
Riccardo Schirone
589ab9299c Fix tests after more rigid wx 2021-11-09 12:01:41 +01:00
Anton Kochkov
39613b5c16
Port C (metainformation) commands to the rzshell (#1752)
* Do not escape strings during the search
* Port `C` (metainformation) commands to the rzshell
* Improve string autodetection
* Remove `Cr` and RZ_META_TYPE_RUN
* Escape `\x1b` as `\e` character in strings
* Move string encoding options to `RzStrEncOptions` struct
* Add `esc_double_quotes` option to `RzStrEncOptions`
* Do not filter out unprintable characters for uppercase check
* Use `esc_double_quotes` when printing the string between '"' in disasm
* Use signed chars on all platforms/architectures

Co-authored-by: Riccardo Schirone <sirmy15@gmail.com>
2021-10-15 16:48:18 +08:00
Anton Kochkov
2c691b91e3
Disable unnecessary io.cache in tests (#1190) 2021-06-04 15:06:02 +02:00
seanachao
a2f8631b6c
Change -, --, = argument and = command meaning (#930)
* Swap = & - R (#615)&(#616)
* Fix R replace =
2021-04-21 16:20:24 +08:00
Itay Cohen
c2f44b4c78
Disable function size by default ##breaking (#669) 2021-02-28 15:05:10 +02: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
Itay Cohen
4ac005d489
Set asm.tabs to 6 and enable asm.tabs.once by default ##config (#290)
* Set asm.tabs to 6
* Enabl asm.tabs.once by default
2021-01-04 17:45:35 +02:00
Aswin C
d42cde8ca5
Disable asm.bytes by default ##cons (#155)
* Disable `asm.bytes` by default

* Fix tests by adding `e asm.bytes=true` (1/n)

* Fix tests by adding  (2/n)

* Fix tests by adding `e asm.bytes=true` (3/n)

* Fix tests by adding `asm.bytes=true` (4/n)

* Fix test by adding `asm.bytes=true` (5/n)

* Fix mostly all broken tests

* Attemp to fix the rzpipe test

* Attempt to fix the tests in `db/cmd/cmd_pipe`

* Fix tests again

* Fix cmd_pipe test

* Add a test where `asm.bytes` is false

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2020-12-15 12:47:33 +01:00
Florian Märkl
d53d1e3845
Final Analysis Renaming (#124)
* Rename missing Analysis Defines
* Rename analysis config vars and other lower case stuff
* Rename test/db/analysis
* Fix analysis tests

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2020-12-08 15:05:24 +08:00
GustavoLCR
a875622087 Reanalyze function after a write ##anal
* Add r_anal_update_analysis_range()
* Add r_anal_function_update_analysis()
2020-11-03 11:49:26 +08:00
Riccardo Schirone
721609a17b
Rename to rizin (#2) 2020-10-01 16:13:03 +02:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
Renamed from test/new/db/cmd/write (Browse further)