Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix old math commands #3828

Merged
merged 6 commits into from
Sep 14, 2023
Merged

Fix old math commands #3828

merged 6 commits into from
Sep 14, 2023

Conversation

ret2libc
Copy link
Member

@ret2libc ret2libc commented Sep 4, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

There were still many references to ? commands, which are now %.

Test plan

...

Closing issues

...

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many broken tests, likely related to the offset changes:

[XX] db/cmd/cmd_pd_bytes pD -10
RZ_NOPLUGINS=1 /private/var/folders/bc/yvvw2g2s4jlg9r8x7tf61xv800009d/T/woodpecker-local-1287038090/rizinorg/rizin/prefix/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'e asm.arch=x86
e asm.bits=64
e asm.bytes=true
wx 90909090909090909090 ; s 10 ; pD -10
' malloc://1024
-- stdout
--- expected
+++ actual
@@ -1,10 +1,10 @@
-            0x00000000      90             nop
-            0x00000001      90             nop
-            0x00000002      90             nop
-            0x00000003      90             nop
-            0x00000004      90             nop
-            0x00000005      90             nop
-            0x00000006      90             nop
-            0x00000007      90             nop
-            0x00000008      90             nop
-            0x00000009      90             nop
+            0x0000000a      90             nop
+            0x0000000b      90             nop
+            0x0000000c      90             nop
+            0x0000000d      90             nop
+            0x0000000e      90             nop
+            0x0000000f      90             nop
+            0x00000010      90             nop
+            0x00000011      90             nop
+            0x00000012      90             nop
+            0x00000013      90             nop

[**]                                  db/cmd/cmd_fuzzed    16173 OK      1011 BR       12 XX       34 FX
[XX] db/cmd/cmd_pd_bytes pD -10 @ 0
RZ_NOPLUGINS=1 /private/var/folders/bc/yvvw2g2s4jlg9r8x7tf61xv800009d/T/woodpecker-local-1287038090/rizinorg/rizin/prefix/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 10
' malloc://512
-- stdout
--- expected
+++ actual
@@ -1,3 +1,3 @@
-            0x00000000      b801000000     mov   eax, 1
-            0x00000005      4839ca         cmp   rdx, rcx
-        ,=< 0x00000008      7f00           jg    0xa
+            0x0000000a      b801000000     mov   eax, 1
+            0x0000000f      4839ca         cmp   rdx, rcx
+        ,=< 0x00000012      7f00           jg    0x14

[XX] db/cmd/cmd_pd_bytes pD -10 @ 10
RZ_NOPLUGINS=1 /private/var/folders/bc/yvvw2g2s4jlg9r8x7tf61xv800009d/T/woodpecker-local-1287038090/rizinorg/rizin/prefix/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 0xa
' malloc://512
-- stdout
--- expected
+++ actual
@@ -1,3 +1,3 @@
-            0x00000000      b801000000     mov   eax, 1
-            0x00000005      4839ca         cmp   rdx, rcx
-        ,=< 0x00000008      7f00           jg    0xa
+            0x0000000a      b801000000     mov   eax, 1
+            0x0000000f      4839ca         cmp   rdx, rcx
+        ,=< 0x00000012      7f00           jg    0x14

librz/core/cmd_descs/cmd_descs.yaml Show resolved Hide resolved
librz/core/tui/panels.c Outdated Show resolved Hide resolved
@XVilka XVilka added this to the 0.6.2 milestone Sep 4, 2023
test/db/tools/rz Outdated Show resolved Hide resolved
We have moved the `?x` commands to `%x`, thus now no command should
start with `?`. This patch makes the parser fail to parse `?x`
strings.
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offset bug still remains, the rest looks good.

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please also cherry-pick to #3847 once merged

@XVilka XVilka merged commit 9d68e96 into dev Sep 14, 2023
48 checks passed
@XVilka XVilka deleted the fix-old-math-commands branch September 14, 2023 01:01
XVilka pushed a commit that referenced this pull request Sep 14, 2023
* core/cmd: Adjust math commands

* shell: make `?x` commands a parsing failure

We have moved the `?x` commands to `%x`, thus now no command should
start with `?`. This patch makes the parser fail to parse `?x`
strings.

* core/tui: use APIs in panels

* There's no `%q` anymore, use `%=`
XVilka pushed a commit that referenced this pull request Sep 14, 2023
* core/cmd: Adjust math commands

* shell: make `?x` commands a parsing failure

We have moved the `?x` commands to `%x`, thus now no command should
start with `?`. This patch makes the parser fail to parse `?x`
strings.

* core/tui: use APIs in panels

* There's no `%q` anymore, use `%=`
vlasel pushed a commit to vlasel/rizinorg-rizin that referenced this pull request Sep 16, 2023
* core/cmd: Adjust math commands

* shell: make `?x` commands a parsing failure

We have moved the `?x` commands to `%x`, thus now no command should
start with `?`. This patch makes the parser fail to parse `?x`
strings.

* core/tui: use APIs in panels

* There's no `%q` anymore, use `%=`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants