[strace/strace] Add lirc ioctl decoding (PR #208)
Dmitry V. Levin
notifications at github.com
Tue Feb 1 12:14:17 UTC 2022
@ldv-alt commented on this pull request.
> + switch (code) {
+ case LIRC_GET_FEATURES:
+ printflags(lirc_features, value, "LIRC_CAN_???");
+ break;
+ case LIRC_GET_SEND_MODE:
+ case LIRC_GET_REC_MODE:
+ case LIRC_SET_SEND_MODE:
+ case LIRC_SET_REC_MODE:
+ printxval(lirc_modes, value, "LIRC_MODE_???");
+ break;
+ default:
+ PRINT_VAL_D(value);
+ break;
+ }
Since `value` is obtained from tracee's memory, its printing should be wrapped with
```
tprint_indirect_begin();
...
tprint_indirect_end();
```
See e.g. `decode_fs_ioc_flags` as an example.
Also, `tprint_arg_next();` should precede any printing, this includes `umove_or_printaddr`.
--
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/pull/208#pullrequestreview-869042529
You are receiving this because you are subscribed to this thread.
Message ID: <strace/strace/pull/208/review/869042529 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20220201/2f07c3ce/attachment.htm>
More information about the Strace-devel
mailing list