Skip to content

Commit

Permalink
..(: Declare macro args as raw (#4453)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Apr 21, 2024
1 parent 0551f25 commit 652591f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion librz/core/cmd_descs/cmd_descs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ static const RzCmdDescArg interpret_macro_multiple_args[] = {
},
{
.name = "macro-arg-set",
.type = RZ_CMD_ARG_TYPE_STRING,
.type = RZ_CMD_ARG_TYPE_RAW,
.flags = RZ_CMD_ARG_FLAG_ARRAY,
.optional = true,

Expand Down
2 changes: 1 addition & 1 deletion librz/core/cmd_descs/cmd_interpret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ commands:
type: RZ_CMD_ARG_TYPE_MACRO
no_space: true
- name: macro-arg-set
type: RZ_CMD_ARG_TYPE_STRING
type: RZ_CMD_ARG_TYPE_RAW
flags: RZ_CMD_ARG_FLAG_ARRAY
optional: true
- name: )
Expand Down
5 changes: 5 additions & 0 deletions test/db/cmd/write
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ $new_addr=%v \`$addr\`+16
.(wz16 "c `%vi 123+1` d")
.(wz16 \`)
.(wz16 "e \` f")
..(wz16 \# "g \# h" "i \" j")
EOF
EXPECT=<<EOF
0x00000000 5c00 0000 0000 0000 0000 0000 0000 0000 \...............
Expand All @@ -473,7 +474,11 @@ EXPECT=<<EOF
0x00000050 6320 3132 3420 6400 0000 0000 0000 0000 c 124 d.........
0x00000060 6000 0000 0000 0000 0000 0000 0000 0000 `...............
0x00000070 6520 6020 6600 0000 0000 0000 0000 0000 e ` f...........
0x00000080 2300 0000 0000 0000 0000 0000 0000 0000 #...............
0x00000090 6720 2320 6800 0000 0000 0000 0000 0000 g # h...........
0x000000a0 6920 2220 6a00 0000 0000 0000 0000 0000 i " j...........
EOF
EXPECT_ERR=
RUN

NAME=Automatically reanalyze function control flow after a write
Expand Down

0 comments on commit 652591f

Please sign in to comment.