Thanks Dave,<br>ioctl related data structures are common.<br>I did not find the -u switch in the help for struct command in crash.<br>Hopefully, my version of crash supports it.<br><br>Dheeraj<br><br><div class="gmail_quote">
On Fri, Mar 7, 2008 at 8:32 PM, Dave Anderson <<a href="mailto:anderson@redhat.com">anderson@redhat.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
Dheeraj Sangamkar wrote:<br>
> Hi,<br>
> When I debug ioctls, I get parameters which are pointers to structures<br>
> in user space.<br>
> I am unable to use the struct command to print these structures.<br>
><br>
> Currently I am using "rd -u" to read the content of user memory and<br>
> decode it based on the structure information I have.<br>
><br>
> Am I missing something? Is there an easier way to do this?<br>
<br>
</div>As an addendum to the steps I described in my last post, it's possible<br>
that in your particular case that the ioctl-related data structures in<br>
user space are also "known" by the kernel, i.e. structures that are<br>
common to both user-space and kernel-space.  If that's true,<br>
then you don't need the "add-symbol-file" step -- just make<br>
sure that you are in the crash context of the process that<br>
owns the user-space instance, determine the user-space address<br>
of the structure, and simply use the "struct -u" option.<br>
<div><div></div><div class="Wj3C7c"><br>
Dave<br>
<br>
<br>
--<br>
Crash-utility mailing list<br>
<a href="mailto:Crash-utility@redhat.com">Crash-utility@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/crash-utility" target="_blank">https://www.redhat.com/mailman/listinfo/crash-utility</a><br>
</div></div></blockquote></div><br>