charles.cc.hsu
charles.cc.hsu

Reputation: 717

How to get my extension’s process ID of the dext for debugging with lldb

I follow this guide Debugging and testing system extensions, and try to debug my dext code.

In the Attach the debugger to your system extension, it said After your system extension launches, run the ps command-line tool and note your extension’s process ID.

This is the current output for my dext status

% systemextensionsctl list
1 extension(s)
--- com.apple.system_extension.driver_extension
enabled active  teamID  bundleID (version)  name    [state]
*   *   K3TDMD9Y6B  com.accusys.scsidriver (1.0/1)  com.accusys.scsidriver  [activated enabled]

and I used the ps command but nothing happen, I can not get my extension’s process ID.

ps aux | grep com.accusys.scsidriver

or

ps -ef | grep com.accusys.scsidriver

How to do that?

Any suggestion is appreciated.

Upvotes: 1

Views: 30

Answers (1)

tuple_cat
tuple_cat

Reputation: 1340

I don't why your driver is not visible with ps aux | grep com.accusys.scsidriver. Similar command on my side works fine.

To debug, make sure that the driver is visible in the app "Activity Monitor" (you can see the PID there also).

You can also make sure that ps aux (without the grep part) shows the driver.

Upvotes: 0

Related Questions