With strace it is possible to see the ioctl call for the certain file descriptor and with certain command. The third argument is a structure, but strace shows it as a raw pointer to the memory. strace output example:
open("/dev/node", O_RDWR) = 3
ioctl(3, 0x108, 0x8f0eb18) = 0
close(3)
Is there a way (strace options or other tools) to see what is the structure, or at least a value behind a raw pointer?
In gdb, if you stop it right before the call to ioctl, you can then enter:
(gdb) p *(ioctl_struct *) 0x8f0eb18
That will show you how the contents of that memory location maps to the ioctl_struct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With