File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -8791,11 +8791,23 @@ def do_invoke(self, argv: List[str]) -> None:
8791
8791
addr = int (argv [0 ], 0 )
8792
8792
if addr >= entry .page_start and addr < entry .page_end :
8793
8793
self .print_entry (entry )
8794
- elif argv [0 ][0 ] in 'r-' and \
8795
- argv [0 ][1 ] in 'w-' and \
8796
- argv [0 ][2 ] in 'x-' :
8797
- perms = Permission .from_process_maps (argv [0 ])
8798
- if entry .permission == perms :
8794
+ elif argv [0 ][0 ] in 'r-?' and \
8795
+ argv [0 ][1 ] in 'w-?' and \
8796
+ argv [0 ][2 ] in 'x-?' :
8797
+ correct = True
8798
+ perms_dict = [Permission .READ , Permission .WRITE ,
8799
+ Permission .EXECUTE ]
8800
+
8801
+ for c , perm in zip (argv [0 ], perms_dict ):
8802
+ if c == '?' :
8803
+ continue
8804
+ elif c == '-' :
8805
+ correct = correct and not entry .permission & perm
8806
+ else :
8807
+ correct = correct and entry .permission & perm
8808
+
8809
+
8810
+ if correct :
8799
8811
self .print_entry (entry )
8800
8812
else :
8801
8813
addr = safe_parse_and_eval (argv [0 ])
You can’t perform that action at this time.
0 commit comments