• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugging AudioServerPlugin on AppleSilicon Monterey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging AudioServerPlugin on AppleSilicon Monterey


  • Subject: Re: Debugging AudioServerPlugin on AppleSilicon Monterey
  • From: Bertrand Van Kempen via Coreaudio-api <email@hidden>
  • Date: Fri, 1 Apr 2022 06:37:31 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=merging.com; dmarc=pass action=none header.from=merging.com; dkim=pass header.d=merging.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Oa+2t0robwM9hb0kUL1ffQbr/uk7UqakmH62k4NwYrU=; b=QzWxnac1l07+da9L16V12vc+n87HiR8wqOenwNntXvmqPJwxkYsalv3zkQsnqHHlNt+mMu2W6Gux9pdJ58dBmGizDSiKOom6EbFritxWU63zQ5C2B+l1NKMsxWdqbk1TK52MokCn61Oif48l2nv/5WaKvlSfiVdaK/7BuhDfEfF8GAIsPZBrxD0npuCCrCxRGU4OkpfpRym1ltvmvsXhdszXtFWM2TdfFO3rqMTsk1HrWb13ci0BI6jjoKMAHPHurtUbsoXre3UkVtNsXZpGzz22l0m5Yp5v1ZtLvQREWDIakVR2JycKtPoLwu51yy/nLkBoFUt0LnwyD6s+hN041Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LCq8IU8zpLkWDZAuiV1ZVGsde136zf1B1nDlnx8FK5bKv9BRc+KdY4q9JHpDIkADmQb+nSc1sVeliUirQu5wMw/jFJ15k0nSucnCtMfuxf5XvNLyhorXvo4SxQ/OZPm/PyRUmjRsdORCb5GZkAGyv0IG3h9y2fyf90vsPtDOaBEp0JPfdc/fsUIk13DnlVS4EFHlesKsSNJw0PMOWhz5CB6MAVz6+8YCcmXy8wCKIxdZzGZDuQaCkzswfS6s+rwgwYb96961NEH8oj6ZmoSnuIFQLj0aVDgzv0KWhnAwv/gvevBfybPsphuNaiTJj0tgTIo+TeZno2XGbMetw4vbIg==
  • Thread-topic: Debugging AudioServerPlugin on AppleSilicon Monterey

Hi Kyle,

Thanks a lot 😊
I confirm it works on a M1 pro/Monterey 12.3/Xcode 13.2.1.

FYI, I tried to attach with process name (Core Audio Driver
(MergingRAVENNAAudioPlugIn.driver)) without success.

If Apple is listening, it would be very useful to provide the ability in Xcode
to “wait on the launch of a process name” to be able to debug the
AudioServerPlugin from the beginning.
The “Attach to process” method provided by Kyle is very useful but doesn’t
allow to debug initialization code of the AudioServerPlugin ;(

Thanks again Kyle,
Bertrand

From: Kyle Neideck <email@hidden>
Date: Wednesday, 30 March 2022 at 12:55
To: Bertrand Van Kempen <email@hidden>
Cc: email@hidden <email@hidden>
Subject: Re: Debugging AudioServerPlugin on AppleSilicon Monterey
Hi Bertrand,

I don't have an Apple Silicon Mac to test with, so I'm not sure if this will
work for you, but I just tried debugging an AudioServerPlugIn on macOS Monterey
(12.2.1 (21D62)) and it seemed to work for me. Here's what I did.

  1.  Disabled SIP.
  2.  Searched for the name of my driver bundle (e.g. "My
AudioServerPlugIn.driver") in Activity Monitor to find the PID of the process
it's running in. The process was called "Core Audio Driver (My
AudioServerPlugIn.driver)".
  3.  Opened Xcode and clicked Debug > Attach to process by PID or name...
  4.  Entered the PID, chose "debug process as root" and clicked Attach.
Then I tested it by setting a breakpoint.

It doesn't sound like I'm doing much different to what you've tried already,
but maybe there's something subtle that's making it work for me.

Kyle

On Mon, 28 Mar 2022 at 02:02, Bertrand Van Kempen via Coreaudio-api
<email@hidden<mailto:email@hidden>> wrote:
Hi,

Since I upgraded my dev machine to a Mac Book Pro 16” M1 Pro, I’m no longer
able to debug my CoreAudio AudioServerPlugin.
On my Catalina dev machine (Intel), I do the following to debug the
AudioServerPlugin:

  1.  launch the plugin form Xcode (process coreaudiod, root, “wait for the
executable to be launched”
  2.  sudo launchctl remove com.apple.audio.coreaudiod
  3.  sudo launchctl load
/System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist

I suppose it is because coreaudiod is no longer executing the AudioServerPlugin
and delegates the execution to
/System/Library/Frameworks/CoreAudio.framework/Versions/A/XPCServices/com.apple.audio.Core-Audio-Driver-Service.helper.xpc/Contents/MacOS/com.apple.audio.Core-Audio-Driver-Service.helper.
I tried to modify the Xcode scheme to wait on
com.apple.audio.Core-Audio-Driver-Service.xpc but without any success.

How do you do to debug your AudioServerPlugin from Xcode?

Cheer,
Bertrand

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list
(email@hidden<mailto:email@hidden>)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden<mailto:email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Debugging AudioServerPlugin on AppleSilicon Monterey (From: Bertrand Van Kempen via Coreaudio-api <email@hidden>)
 >Re: Debugging AudioServerPlugin on AppleSilicon Monterey (From: Kyle Neideck via Coreaudio-api <email@hidden>)

  • Prev by Date: Re: Debugging AudioServerPlugin on AppleSilicon Monterey
  • Previous by thread: Re: Debugging AudioServerPlugin on AppleSilicon Monterey
  • Index(es):
    • Date
    • Thread