Date: Thu, 15 Sep 2022 08:37:55 +0000 From: Lee MATTHEWS <Lee.MATTHEWS.external@stormshield.eu> To: "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org> Subject: Tracing userland calls through to a driver Message-ID: <484f6c4f5a2840daafaeda4943f22793@stormshield.eu>
next in thread | raw e-mail | index | archive | help
--_000_484f6c4f5a2840daafaeda4943f22793stormshieldeu_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I am trying to debug some GPIO issues on FreeBSD 10.3. I'd like to know if= it is possible to know what process in userland (via a process id) has cal= led a method in the driver. So for example, in the driver, the functions are bound via DEVMETHOD like : static device_method_t winbond_gpio_methods[] =3D { /* Device interface */ ... DEVMETHOD(gpio_pin_set, winbond_gpio_pin_set), DEVMETHOD(gpio_pin_get, winbond_gpio_pin_get), ... DEVMETHOD_END }; When the function winbond_gpio_pin_get() is called, how can I know what cal= led this? Thanks in advance. Best wishes, Lee Matthews --_000_484f6c4f5a2840daafaeda4943f22793stormshieldeu_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi= n-bottom:0;} --></style> </head> <body dir=3D"ltr"> <div id=3D"divtagdefaultwrapper" dir=3D"ltr" style=3D"font-size: 12pt; colo= r: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFo= nt", "Apple Color Emoji", "Segoe UI Emoji", NotoCo= lorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymb= ols;"> <p>Hello,</p> <p><br> </p> <p>I am trying to debug some GPIO issues on FreeBSD 10.3. I'd like to= know if it is possible to know what process in userland (via a process id)= has called a method in the driver.<br> <br> So for example, in the driver, the functions are bound via DEVMETHOD like := </p> <p><br> </p> <p></p> <div>static device_method_t winbond_gpio_methods[] =3D {<br> /* Device interface */<br> ...<br> DEVMETHOD(gpio_pin_set, &= nbsp; winbond_gpio_pin_set),<br> DEVMETHOD(gpio_pin_get, &= nbsp; winbond_gpio_pin_get),<br> ...<br> DEVMETHOD_END<br> };</div> <p></p> <p><br> </p> <p>When the function <span>winbond_gpio_pin_get()</span> is called, how can= I know what called this?</p> <p><br> </p> <p>Thanks in advance.</p> <p><br> </p> <p>Best wishes,</p> <p>Lee Matthews<br> </p> <p><br> </p> <p><br> </p> </div> </body> </html> --_000_484f6c4f5a2840daafaeda4943f22793stormshieldeu_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?484f6c4f5a2840daafaeda4943f22793>